Skip to content
This repository was archived by the owner on Nov 9, 2024. It is now read-only.

Conversation

@atomiks
Copy link
Owner

@atomiks atomiks commented Oct 1, 2019

Will this work @KubaJastrz

The new prettier formatting didn't format this file after the change..

index.d.ts Outdated
import {default as tippyCore, Instance, Props, Plugin} from 'tippy.js';

type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Omit was added in TypeScript 3.5 so we can remove it (probably need to bump the dependency)

index.d.ts Outdated
export const tippy: typeof tippyCore
export const tippy: typeof tippyCore;

export interface TippySingletonProps extends Props {
Copy link
Contributor

@KubaJastrz KubaJastrz Oct 1, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add Partial here as it is only needed for the base interface. children is still required.

Suggested change
export interface TippySingletonProps extends Props {
export interface TippySingletonProps extends Partial<Props> {

index.d.ts Outdated
export const TippySingleton: React.FunctionComponent<TippySingletonProps>
export const TippySingleton: React.FunctionComponent<
Partial<TippySingletonProps>
>;
Copy link
Contributor

@KubaJastrz KubaJastrz Oct 1, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert as described here

@atomiks atomiks merged commit 5eff968 into master Oct 1, 2019
@atomiks atomiks deleted the fix-types branch October 1, 2019 17:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants