-
Notifications
You must be signed in to change notification settings - Fork 99
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
Add generator blueprint for prototype extensions #88
Comments
AFAIK array prototype extensions are the only ones that aren't already deprecated/slated for deprecation, so it makes sense to me that they'd be the only ones enabled by default. |
Can a blueprint detect if it's an addon vs. app for the array prototype extensions? |
In most cases yes, though the addon story for e-c-ts is a little bit of an oddball, since having it as a |
Looking at what I have for this in #108 and the discussion above: it looks like the function prototype extensions should probably be included but commented out to make it easy for people to “flip a switch” and turn them on? |
Just a heads up: enabling
Hope this helps anyone coming across that issue. |
We should generate a
.d.ts
with prototype extensions.Prototype extensions are controlled by
EXTEND_PROTOTYPES
:https://guides.emberjs.com/v2.3.0/configuring-ember/disabling-prototype-extensions/
We can't conditionally enable types based on this so the best we can do is generate a
.d.ts
which the user can edit.Array prototype extensions should be enabled by default for apps and disabled for addons. Function prototype extensions should be disabled by default probably. We haven't implemented string prototype extensions.
The text was updated successfully, but these errors were encountered: