Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should createTypeAliasDeclaration have decorators/modifiers arguments? #15918

Closed
phated opened this issue May 17, 2017 · 2 comments · Fixed by singapore/lint-condo#297
Closed
Labels
API Relates to the public API for TypeScript Bug A bug in TypeScript Fixed A PR has been merged for this issue Help Wanted You can do this

Comments

@phated
Copy link
Contributor

phated commented May 17, 2017

TypeScript Version: nightly (2.4.0-dev.20170517)

Code

// A *self-contained* demonstration of the problem follows...

// Unable to add `export` this Type Alias
var typeDef = ts.createTypeAliasDeclaration(
  'myType',
  ts.createKeywordTypeNode(ts.SyntaxKind.StringKeyword)
);

Expected behavior:
Should be able to add an export modifier to the node.

Actual behavior:
This API doesn't seem to have the same signature as createInterfaceDeclaration or createEnumDeclaration, etc. Should it have decorators and modifiers parameters like the other APIs?

I'm willing to send a PR if so.

@DanielRosenwasser DanielRosenwasser added API Relates to the public API for TypeScript Bug A bug in TypeScript labels May 18, 2017
@mhegazy
Copy link
Contributor

mhegazy commented May 18, 2017

PRs welcomed.

@phated
Copy link
Contributor Author

phated commented May 18, 2017

Thanks for the response. PR submitted.

sandersn added a commit that referenced this issue May 19, 2017
…parameters

Make {create/update}TypeAliasDeclaration API consistent (closes #15918)
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label May 19, 2017
@mhegazy mhegazy added this to the TypeScript 2.4 milestone May 19, 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
API Relates to the public API for TypeScript Bug A bug in TypeScript Fixed A PR has been merged for this issue Help Wanted You can do this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants