Skip to content

No self option#718

Merged
Perryvw merged 17 commits into
TypeScriptToLua:masterfrom
hazzard993:no-self-option
Sep 30, 2019
Merged

No self option#718
Perryvw merged 17 commits into
TypeScriptToLua:masterfrom
hazzard993:no-self-option

Conversation

@hazzard993

@hazzard993 hazzard993 commented Sep 6, 2019

Copy link
Copy Markdown
Contributor

Closes #716

New option: --noImplicitSelf (boolean) (false by default)

Implicitly enables @noSelfInFile for all root files and will add the @noSelfInFile annotation to the top of generated declaration files.

Comment thread test/unit/noSelfOption.spec.ts Outdated
Comment thread test/unit/noSelfOption.spec.ts Outdated
Comment thread test/unit/noSelfOption.spec.ts Outdated
Comment thread test/unit/noSelfOption.spec.ts Outdated
Comment thread src/NoSelfTransformer.ts Outdated
Comment thread src/Transpile.ts Outdated

@ark120202 ark120202 left a comment

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.

I think it would be nice to give some more thought to option name. Actually noSelfInFile doesn't really fit it's purpose as well, since, unlike noSelf, it doesn't affect contexts where self is implied (like methods).

Comment thread src/NoSelfTransformer.ts Outdated
Comment thread test/unit/functions/noSelfOption.spec.ts Outdated
Comment thread test/unit/functions/noSelfOption.spec.ts Outdated
Comment thread test/unit/functions/noSelfOption.spec.ts Outdated
Comment thread test/unit/functions/noSelfOption.spec.ts Outdated
Co-Authored-By: ark120202 <ark120202@gmail.com>
Comment thread src/TSHelper.ts Outdated
Comment thread src/TSHelper.ts Outdated
Comment thread src/CommandLineParser.ts Outdated
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.

Add an option to disable implicit self argument in project

3 participants