Skip to content

Conversation

@mattmazzola
Copy link
Contributor

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.
@msftclas msftclas added the documentation Improvements or additions to documentation label May 26, 2016
@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

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants