5 update add type declaration dts file
Adding type declarations for the src code.
Thanks @dpeachpeach! The next step is to combine these d.ts files into index.d.ts, which will work with index.js under lib directory. To make the type declaration index.d.ts working, you also need to add the following line in package.json:
"main": "./lib/index.js",
+ "types": "./lib/index.d.ts",
@dpeachpeach See my changes and comments above. You should be able to run yarn and then yarn build:bundle to generate the file lib/index.d.ts for the library.
Hey @lixun910 , I successfully generated the file and it is more precise but it still seems like it sets multiple type signatures to any. We can discuss in the meeting.
@dpeachpeach I've made some changes to this branch, you can do git pull to get these changes on your side. The index.d.ts should be auto-generated when you run yarn build.
@dpeachpeach Please also update the version to 0.2.10 in package.json Thanks!