TS: Cant define simple Array schema
See original GitHub issueSchema copied from the docs:
{
"friends": {
"type": Array,
"schema": [String]
}
}
Error:
Type ‘StringConstructor[]’ is not assignable to type ‘SchemaDefinition | SchemaDefinition[]’
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
How can I define an array of objects? - Stack Overflow
@Marilou You can usually get the definition simply by hovering over the userTestStatus variable in your favourite IDE... the TypeScript ...
Read more >[BUG] can't define a schema which includes a list of objects in ...
Summary: I cant define a schema which includes a list of objects. Code sample: Working version with a javascript model: new dynamoose.
Read more >TypeScript Arrays - GeeksforGeeks
An array is a user-defined data type. An array is a homogeneous collection of similar types of elements that have a contiguous memory ......
Read more >GraphQL schema basics
Your GraphQL server uses a schema to describe the shape of your available data. This schema defines a hierarchy of types with fields...
Read more >TypeScript Array of Objects | Syntax of Declaring the ... - eduCBA
TypeScript Arrays are themselves a data type just like a string, Boolean, ... In the same context, the user cannot declare an interface...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This issue is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 3 days.
The program would run well. To resolve, Add
//@ts-ignore
above the error like below