Skip to content

Use type annotation in declarations emitter - #1122

Merged
Sheetal Nandi (sheetalkamat) merged 19 commits into
masterfrom
useTypeAnnotationInDeclarationsEmitter
Nov 21, 2014
Merged

Sheetal Nandi (sheetalkamat) merged 19 commits into
masterfrom
useTypeAnnotationInDeclarationsEmitter

Conversation

@sheetalkamat

Copy link
Copy Markdown
Member

If user specified type annotation exists in the typescript file, use that instead of inferring the name from the symbol

Comment thread src/compiler/emitter.ts

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why not just write the text of teh node here? i.e. writeTextOfNode(type)? For that matter, why not just call writeTextOfNode for all TypeNode's?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

that's because we want to format how we are writing d.ts ... We do need to go deep in the type node though to check if it is referencing any type that is not visibile so it didn't seem much of a work writing the text to declaration file along with traversing.

Sheetal Nandi (sheetalkamat) added a commit that referenced this pull request Nov 21, 2014
…nsEmitter

Use type annotation in declarations emitter
@sheetalkamat
Sheetal Nandi (sheetalkamat) deleted the useTypeAnnotationInDeclarationsEmitter branch November 21, 2014 00:58
@microsoft Microsoft (microsoft) locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants