Skip to content

Public API and better webpack compatibility #239

Merged
Perryvw merged 4 commits intomasterfrom
public-api
Oct 15, 2018
Merged

Public API and better webpack compatibility #239
Perryvw merged 4 commits intomasterfrom
public-api

Conversation

@lolleko
Copy link
Copy Markdown
Member

@lolleko lolleko commented Oct 13, 2018

No description provided.

@lolleko lolleko requested a review from Perryvw October 13, 2018 20:48
src/TSHelper.ts Outdated
// export statement, we only check for export statements
return sourceFile.statements.some(statement =>
(ts.getCombinedModifierFlags(statement) & ts.ModifierFlags.Export) !== 0
(ts.getCombinedModifierFlags(statement as any as ts.Declaration) & ts.ModifierFlags.Export) !== 0
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this because of TS3? Might be nicer to do sourceFile.statements.filter(ts.isDeclaration).some(ts.getCombinedModifierFlags.... if that avoids this hacky casting.

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.

Yes, even though I didn't update to TS3 I left that in there, so it's easier in the future.
Since we are only looking for exports I guess its fine to only check the declarations like you recommended.

@Perryvw
Copy link
Copy Markdown
Member

Perryvw commented Oct 15, 2018

There's an empty src/LuaLibFeatures/ts file in changes I can't comment on.

@Perryvw Perryvw merged commit 2cf9a79 into master Oct 15, 2018
@Perryvw Perryvw deleted the public-api branch October 15, 2018 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants