Skip to content

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

@allthesignals

Description

@allthesignals

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:

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions