Skip to content

Commit cb15123

Browse files
Added additional property syntax modes
1 parent 15487b3 commit cb15123

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@graphdl/core",
33
"description": "GraphDL Core",
4-
"version": "0.1.4",
4+
"version": "0.1.5",
55
"type": "module",
66
"main": "index.js",
77
"types": "index.ts",

packages/core/properties.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ export type PropertyReference<G extends Graph<G>, N extends keyof G['nouns'], P
1212
keyof G['nouns'] extends string ? (keyof G['nouns'] | `${keyof G['nouns']}.${P extends string ? P : never}` | `[${keyof G['nouns']}]`) : never
1313

1414
export type Properties<G extends Graph<G>, N extends keyof G['nouns']> = {
15-
[P in keyof G['properties'][N]]: Property<G,N,P> | `${Property<G,N,P>}!`
15+
[P in keyof G['properties'][N]]: Property<G,N,P> | `${Property<G,N,P>}!` | { type: Property<G,N,P> | `${Property<G,N,P>}!` }
1616
}
1717

1818
export type Property<G extends Graph<G>, N extends keyof G['nouns'], P extends keyof G['properties'][N]> =
19-
PrimitiveTypes | ComplexTypes | FunctionalTypes | ThingProperties | PropertyReference<G,N,P>
19+
PrimitiveTypes | ComplexTypes | FunctionalTypes | ThingProperties | PropertyReference<G,N,P> | FieldTypes
2020

2121

2222
export type PrimitiveTypes = 'String' | 'Number' | 'Boolean' | 'Date' | 'Time' | 'DateTime' | 'Timestamp' | 'ObjectId' | 'Array' | 'Object' | 'JSON' | 'Any'

0 commit comments

Comments
 (0)