Skip to content

Conversation

developit
Copy link
Member

No description provided.

@coveralls
Copy link

coveralls commented Jan 11, 2022

Coverage Status

Coverage remained the same at 99.625% when pulling b6053a1 on types-createcontext-default-value into d4a3013 on master.

@@ -307,4 +307,4 @@ export interface Context<T> {
}
export interface PreactContext<T> extends Context<T> {}

export function createContext<T>(defaultValue: T): Context<T>;
export function createContext<T = undefined>(defaultValue: T): Context<T>;
Copy link
Member Author

Choose a reason for hiding this comment

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

Or maybe this?

Suggested change
export function createContext<T = undefined>(defaultValue: T): Context<T>;
export function createContext<T>(defaultValue: T): Context<T>;
export function createContext<T extends undefined>(defaultValue?: T): Context<T>;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants