Add createTypeAliasDeclaration and updateTypeAliasDeclaration factories#15511
Merged
rbuckton merged 3 commits intoMay 2, 2017
microsoft:mastermicrosoft/TypeScript:masterfrom
mohsen1:add-ts.createTypeAliasDeclarationmohsen1/TypeScript:add-ts.createTypeAliasDeclarationCopy head branch name to clipboard
Merged
Add createTypeAliasDeclaration and updateTypeAliasDeclaration factories#15511rbuckton merged 3 commits intomicrosoft:mastermicrosoft/TypeScript:masterfrom mohsen1:add-ts.createTypeAliasDeclarationmohsen1/TypeScript:add-ts.createTypeAliasDeclarationCopy head branch name to clipboard
rbuckton merged 3 commits into
microsoft:mastermicrosoft/TypeScript:masterfrom
mohsen1:add-ts.createTypeAliasDeclarationmohsen1/TypeScript:add-ts.createTypeAliasDeclarationCopy head branch name to clipboard
Conversation
|
@mohsen1, |
rbuckton
suggested changes
May 1, 2017
| return node; | ||
| } | ||
|
|
||
| export function updateTypeAliasDeclaration(node: TypeAliasDeclaration, name: string | Identifier, typeParameters: TypeParameterDeclaration[] | undefined, type: ts.TypeNode) { |
Contributor
There was a problem hiding this comment.
name should just be Identifier here. Also, you do not need to qualify TypeNode with the ts. namespace.
Contributor
|
The PR builds failed. Did you run all of the tests? |
Contributor
Author
|
Failures don't seem to be related. |
phated
reviewed
May 1, 2017
| } | ||
|
|
||
| export function createTypeAliasDeclaration(name: string | Identifier, typeParameters: TypeParameterDeclaration[] | undefined, type: ts.TypeNode) { | ||
| export function createTypeAliasDeclaration(name: Identifier, typeParameters: TypeParameterDeclaration[] | undefined, type: TypeNode) { |
Contributor
There was a problem hiding this comment.
This should still support string. The update method is the only one that only accepts Identifier
Contributor
Author
|
@rbuckton is this g2g? |
rbuckton
approved these changes
May 2, 2017
Contributor
|
Looks good! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #15489