-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: Node.js, React Native
How frequently does the bug occur?
– select –
Description
Since 12.0.0 i keep getting:
TS2322: Type typeof Mean is not assignable to type RealmObjectConstructor<AnyRealmObject> | ObjectSchema Type typeof Mean is not assignable to type RealmObjectConstructor<AnyRealmObject> Types of property schema are incompatible. Type '{ name: string; primaryKey: string; properties: { id: string; '@id': string; name: { type: string; optional: boolean; }; description: string; active: { type: string; indexed: boolean; optional: boolean; }; ... 8 more ...; __isSynced: { ...; }; }; }' is not assignable to type 'ObjectSchema'. Type '{ name: string; primaryKey: string; properties: { id: string; '@id': string; name: { type: string; optional: boolean; }; description: string; active: { type: string; indexed: boolean; optional: boolean; }; ... 8 more ...; __isSynced: { ...; }; }; }' is not assignable to type '{ properties: PropertiesTypes; }'. Types of property properties are incompatible. Type '{ id: string; '@id': string; name: { type: string; optional: boolean; }; description: string; active: { type: string; indexed: boolean; optional: boolean; }; createdAt: string; updatedAt: string; deletedAt: string; ... 5 more ...; __isSynced: { ...; }; }' is not assignable to type 'PropertiesTypes'. Property name is incompatible with index signature. Type { type: string; optional: boolean; } is not assignable to type string | PropertySchema Type { type: string; optional: boolean; } is not assignable to type PropertySchema Types of property type are incompatible. Type string is not assignable to type PropertyTypeName
export class Mean extends Realm.Object<Mean, 'id'> { id!: number; '@id'?: string; name?: string; description?: string; active?: ActiveEnum; createdAt?: Date; updatedAt?: Date; deletedAt?: Date; type?: number; space?: Space; object?: Objects; location?: Location; __isDeleted?: boolean; __isSynced?: boolean; static schema = { name: MeanName, primaryKey: 'id', properties: { id: 'int', '@id': 'string?', name: { type: 'string', optional: true }, description: 'string?', active: { type: 'int', indexed: true, optional: true }, createdAt: 'date?', updatedAt: 'date?', deletedAt: 'date?', type: 'int?', space: 'Space?', object: 'Objects?', location: 'Location', __isDeleted: { type: 'bool', default: false, indexed: true }, __isSynced: { type: 'bool', default: false, indexed: true }, }, }; }
Stacktrace & log output
Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
See above
Can you reproduce the bug?
Always
Reproduction Steps
No response
Version
12.0.0
What services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
expo 49
Build environment
Which debugger for React Native: flippah
Cocoapods version
No response