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

Add gulp compile:dts task which generates single .d.ts from multiple files as workaround. #16

Merged
merged 2 commits into from Jun 1, 2016

Conversation

mattmazzola
Copy link
Member

This is a workaround for one of the biggest pain points in developing on the project which is manually updating the .d.ts file.

See: microsoft/TypeScript#4433

Steps:

  1. Use tsd --declarations to generate a .d.ts file for each of the source files
  2. Removes all the import statements (paths are not relevant since end goal is single file)
  3. Concatenate all the .d.ts files to single powerbi.d.ts

Pros:
Autogenerates .d.ts

Cons:

  • Can't use default exports since the concatenation would put multiple defaults in the same file
  • Does not allow for encapsulation of internal interfaces due to concatenation.

… workaround.

This uses concatenation which means we can use default exports.
@mattmazzola mattmazzola merged commit 6a18899 into master Jun 1, 2016
@mattmazzola mattmazzola deleted the dev/mattm/generatedts branch June 1, 2016 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants