You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No overload matches this call.
Overload 1 of 2, '(target: scalarTypeWithConstructor<$str, never>, arg: null): $expr_Cast<scalarTypeWithConstructor<$str, never>, Cardinality.Empty>', gave the following error.
Argument of type '$expr_Operator<$json, Cardinality.One> | undefined' is not assignable to parameter of type 'null'.
Type 'undefined' is not assignable to type 'null'.
Overload 2 of 2, '(target: scalarTypeWithConstructor<$str, never>, expr: orScalarLiteral<TypeSet<BaseType, Cardinality>>): $expr_Cast<...>', gave the following error.
Argument of type '$expr_Operator<$json, Cardinality.One> | undefined' is not assignable to parameter of type 'orScalarLiteral<TypeSet<BaseType, Cardinality>>'.
Type 'undefined' is not assignable to type 'orScalarLiteral<TypeSet<BaseType, Cardinality>>'.ts(2769)
Versions (please complete the following information):
OS: w11
"@edgedb/generate": "^0.4.1",
EdgeDB version (e.g. 2.0): 4.5
EdgeDB CLI version (e.g. 2.0): 4.1
edgedb-js version (e.g. 0.20.10;): 0.2.0-beta
Additional context
also with plain eql it does not work without json_get:
#error: InvalidReferenceError: invalid property reference on a primitive type expressionfor item injson_array_unpack(<json>$items)
union (select {
name := item.name,
icon := item.icon
})
# OKfor item injson_array_unpack(<json>$items)
union (select {
name :=<str>json_get(item, "name"),
icon :=<str>json_get(item, "icon")
})
The text was updated successfully, but these errors were encountered:
Describe the bug
The bulk insert example needs to use the
e.json_get()
instead of directly accessing the elementedgedb-js/docs/for.rst
Line 31 in f9f39c9
Reproduction
Expected behavior
I believe to update docs is just ok.
But the code works with the type error, so maybe the types in the generator needs to be updated?
Or just assert the undefined with
!
:Versions (please complete the following information):
2.0
): 4.52.0
): 4.1edgedb-js
version (e.g.0.20.10
;): 0.2.0-betaAdditional context
also with plain eql it does not work without json_get:
The text was updated successfully, but these errors were encountered: