ember-decorators / ember-decorators/argument

expected value of type undefined during 'init', but received: [object Object]

Open
#93 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
30
Forks
18
PR merge metrics
No merged PRs in 30d

Description

I'm using mirage for testing, and I have type validation on one of my models. When I run a test, I'm seeing this:

`_default#proposedGeometry expected value of type undefined during 'init', but received: [object Object]`

But I _have_ defined the type as something:

```javascript
import { FeatureCollection, EmptyFeatureCollection } from './project';

// ... class {

@type(FeatureCollection)
@attr({ defaultValue: () => EmptyFeatureCollection })
proposedGeometry;
```

The problem is that FeatureCollection actually imports as `undefined` in my test environment. Could this have something to do with e-decorators stripping out type validation in the wrong place?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.