Closed Gholgot closed 4 years ago
Any update on this ?
It has been merged @german-bortoli thanks to @hypervillain :-)
Perhaps you are aware on what is the best way to go about including the types as of right now @Gholgot? Due to the package not yet being updated, npm i prismic-reactjs
seemingly still gives you the package without the types.
I currently created types/prismic-reactjs
and added the contents of typings/index.d.ts
to it. This seems to work.
tsconfig.json
{
"compilerOptions": {
"typeRoots": ["./types", "./node_modules/@types"]
}
}
types/prismic-reactjs/index.d.ts
declare module "prismic-reactjs" {
// content of typings/index.d.ts
}
Another option might be to pull it via GitHub as below, but having to build it yourself might be more of a hassle?
npm i @git://github.com/prismicio/prismic-reactjs.git#6682fe1
@imjasonmiller It would seem they have not released since this was merged. 1.2 is from jan.
In order to fix the following issue : #42 Implementing a definition type for : RichText stateless component.
The Date export might be called differently in the future, to avoid overwriting the default Date JS class.