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

Add createTypeAliasDeclaration and updateTypeAliasDeclaration factories#15511

Merged
rbuckton merged 3 commits into
microsoft:mastermicrosoft/TypeScript:masterfrom
mohsen1:add-ts.createTypeAliasDeclarationmohsen1/TypeScript:add-ts.createTypeAliasDeclarationCopy head branch name to clipboard
May 2, 2017
Merged

Add createTypeAliasDeclaration and updateTypeAliasDeclaration factories#15511
rbuckton merged 3 commits into
microsoft:mastermicrosoft/TypeScript:masterfrom
mohsen1:add-ts.createTypeAliasDeclarationmohsen1/TypeScript:add-ts.createTypeAliasDeclarationCopy head branch name to clipboard

Conversation

@mohsen1

@mohsen1 mohsen1 commented May 1, 2017

Copy link
Copy Markdown
Contributor

Fixes #15489

@msftclas

msftclas commented May 1, 2017

Copy link
Copy Markdown

@mohsen1,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by Microsoft. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

Comment thread src/compiler/factory.ts Outdated
return node;
}

export function updateTypeAliasDeclaration(node: TypeAliasDeclaration, name: string | Identifier, typeParameters: TypeParameterDeclaration[] | undefined, type: ts.TypeNode) {

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.

name should just be Identifier here. Also, you do not need to qualify TypeNode with the ts. namespace.

@rbuckton

rbuckton commented May 1, 2017

Copy link
Copy Markdown
Contributor

The PR builds failed. Did you run all of the tests?

@mohsen1

mohsen1 commented May 1, 2017

Copy link
Copy Markdown
Contributor Author

Failures don't seem to be related.

Comment thread src/compiler/factory.ts Outdated
}

export function createTypeAliasDeclaration(name: string | Identifier, typeParameters: TypeParameterDeclaration[] | undefined, type: ts.TypeNode) {
export function createTypeAliasDeclaration(name: Identifier, typeParameters: TypeParameterDeclaration[] | undefined, type: TypeNode) {

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.

This should still support string. The update method is the only one that only accepts Identifier

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated. Thanks!

@mohsen1

mohsen1 commented May 2, 2017

Copy link
Copy Markdown
Contributor Author

@rbuckton is this g2g?

@rbuckton

rbuckton commented May 2, 2017

Copy link
Copy Markdown
Contributor

Looks good!

@rbuckton rbuckton merged commit 1db4f96 into microsoft:master May 2, 2017
@rbuckton rbuckton mentioned this pull request May 2, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 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.

4 participants

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