Skip to content
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

fix(module): typings for sdk, knex & router #2995

Merged
merged 3 commits into from Feb 25, 2020
Merged

Conversation

allardy
Copy link
Member

@allardy allardy commented Feb 25, 2020

This PR removes the botpress.d.ts and global.d.ts file which is copied in each modules.

  • Fixes the issue where botpress/sdk was unrecognized until the botpress.d.ts file was opened
  • Fixes missing typings for Knex when developing in modules (type the db as sdk.KnexExtended)
  • Fixes missing typings for routers
  • Changes to the SDK are immediately available

The code editor doesn't have the typings for knex or the router, if someone is interested to play around...

@@ -1,9 +1,15 @@
module.exports = {
copyFiles: [
'src/botpress.d.ts',
'src/typings/node.d.ts',
'src/typings/node.d.txt',
Copy link
Contributor

Choose a reason for hiding this comment

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

why change the extension here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Otherwise typescript uses this file for "global.d.ts" typings since it's closer, and other modules also uses this one

@allardy allardy merged commit fc61430 into master Feb 25, 2020
@allardy allardy deleted the ya-module-typings branch February 26, 2020 16:22
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.

None yet

2 participants