Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix printing and emit for definite assignment assertions#35095

Merged
weswigham merged 2 commits into
microsoft:mastermicrosoft/TypeScript:masterfrom
weswigham:fix-assignment-assertion-emitweswigham/TypeScript:fix-assignment-assertion-emitCopy head branch name to clipboard
Nov 21, 2019
Merged

Fix printing and emit for definite assignment assertions#35095
weswigham merged 2 commits into
microsoft:mastermicrosoft/TypeScript:masterfrom
weswigham:fix-assignment-assertion-emitweswigham/TypeScript:fix-assignment-assertion-emitCopy head branch name to clipboard

Conversation

@weswigham

Copy link
Copy Markdown
Member

Fixes #35093

We use definite assignment assertions in our own codebase, so the referenced bug is actually blocking me doing source to source transforms on our real codebase.

Comment thread src/compiler/binder.ts

// Type annotations are TypeScript syntax.
if (node.type) {
if (node.type || node.exclamationToken) {

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.

is this change related to the emitter?
If so, you probably also want to make the same change in computePropertyDeclaration (see #35097 which I erroneously opened)

@weswigham weswigham merged commit 614a07c into microsoft:master Nov 21, 2019
@weswigham weswigham deleted the fix-assignment-assertion-emit branch November 21, 2019 19:21
jablko pushed a commit to jablko/TypeScript that referenced this pull request Nov 21, 2019
…5095)

* Fix printing and emit for definite assignment assertions

* Make factories that handle definite assertions internal
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
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.

Definite assignment assertions are not emitted by printer

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.