Skip to content

Commit

Permalink
fix(ts): export Promised as a value
Browse files Browse the repository at this point in the history
* Export Promised value to Typescript (fixes #21)

Added a declaration of the global Promised value for typescript code.
Without this, Javascript will work but the Typescript compiler will fail
with `'Promised' only refers to a type, but is being used as a value
here.` breaking the build.

* Update index.d.ts
  • Loading branch information
gregopet authored and posva committed Mar 25, 2019
1 parent af2f50c commit bf6515e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interface Props {
pendingDelay: Number | String
}

export type Promised = ComponentOptions<
export var Promised: ComponentOptions<
never,
Data,
DefaultMethods<never>,
Expand Down

0 comments on commit bf6515e

Please sign in to comment.