-
Notifications
You must be signed in to change notification settings - Fork 21
Update self parameter information #17
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
Conversation
docs/faq/the-self-parameter.md
Outdated
|
|
||
| ## Removing it | ||
|
|
||
| ### `noImplicitSelf` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should leave it as the last option, since more likely users would want to disable this behavior for Lua declarations, which are generally not affected by noImplicitSelf
| Telling TypeScript not to allow `this` to be used will eliminate that parameter from its containing context. | ||
|
|
||
| Other workarounds are available for removing this too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to mention that disabling it should be done only when it's required for interop, but not for regular code
sidebars.json
Outdated
| }, | ||
| { | ||
| "type": "category", | ||
| "label": "FAQ", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we'll have more FAQ in the future? If we don't, I think it could be a top-level page, probably after "caveats" in the sidebar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we might, but good idea to keep it top level for now
Thought I'd take a look at this page since self parameter questions are the most common questions we get
Some users might look for an FAQ section before asking
docs/advanced/functions-and-the-self-parametertodocs/the-self-parameternoImplicitSelfAssignment Errorssection to describe the error as being an incompatibility between two typesAssignment Errorsto quote the errors instead of having them in code comments