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

Array attribute typing seems to be wrong #457

Open
canrozanes opened this issue Feb 15, 2023 · 1 comment
Open

Array attribute typing seems to be wrong #457

canrozanes opened this issue Feb 15, 2023 · 1 comment
Labels
bug Used when the PR fixes a bug included in a previous release. good first issue

Comments

@canrozanes
Copy link

The following line suggest that array attribute takes in two arguments, type and options.

function array(type, options) {

Whereas the existing type information defined in the line below suggest array attribute does not take any arguments:

export function array<T extends keyof TransformRegistry>(): ComputedProperty<TransformRegistry[T]>;

@knownasilya
Copy link
Collaborator

Looks like the types need updating, since the options are used for { defaultValue }.
https://github.com/adopted-ember-addons/ember-data-model-fragments/blame/cfa5e5e1716d2508a13a0e973cf5b51c45bedb79/addon/attributes.js#L129

@knownasilya knownasilya added good first issue bug Used when the PR fixes a bug included in a previous release. labels Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Used when the PR fixes a bug included in a previous release. good first issue
Projects
None yet
Development

No branches or pull requests

2 participants