-
Notifications
You must be signed in to change notification settings - Fork 81
Add TypeScript definitions #146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@emlynmac do you want to review the TS definitions? I don't really know TS myself. |
ee75100
to
4f92cbf
Compare
@aknuds1 happy to be of help ! |
4f92cbf
to
75d6677
Compare
It looks to me that the TS definitions are broken, any help would be appreciated:
|
73c183e
to
aeb6b53
Compare
Since I found that the TS type definitions from #142 wouldn't compile, I've committed and pushed automatically generated type definitions in the types/ directory instead. I generated them by adding the following tsconfig.json and executing {
"include": ["lib/**/*"],
"compilerOptions": {
"allowJs": true,
// Generate d.ts files
"declaration": true,
"emitDeclarationOnly": true,
"outDir": "types",
"declarationMap": true,
"strict": true
}
} To test that the type definitions are valid, I've also rewritten the test suite in TypeScript and checked in VS Code. |
The auto-generated TS definitions are a little weak - the definitions are basically using |
Thank you @emlynmac - that would be great. |
I got a chance to look at this today and have an overlay type definition for local use:
|
I added #148 to cover the version I put together. |
555d90a
to
4373412
Compare
75c7401
to
5161f2b
Compare
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
5161f2b
to
41915bf
Compare
Cherry-pick of #142, since that has a merge conflict. Thanks @xnevz!
Since the ones from #142 don't work properly, TS type definitions (in the types directory) are automatically generated, by adding the following tsconfig.json and executing
tsc
:To test that the type definitions are valid, I've also rewritten the test suite in TypeScript and checked in VS Code.
Fixes #134.