mobxjs / serializr

Serialize and deserialize complex object graphs to and from JSON and Javascript classes
MIT License
766 stars 52 forks source link

Error: [serializr] expected modelSchema, got undefined #180

Closed divyam234 closed 1 year ago

divyam234 commented 1 year ago

Always getting this error even after enabling decorator in tsconfig

export class FileIn {
    @serializable
    name: string

    @serializable
    type: string

    @serializable
    mime_type: string

    @serializable
    path?: string
}

This is my schema and when I call this deserialize(FileIn,body) it immediately throws error