Skip to content

Commit

Permalink
Fix typescript errors for generated query builder (#716)
Browse files Browse the repository at this point in the history
  • Loading branch information
progrestian authored Aug 21, 2023
1 parent c6d8d5c commit 4b01e37
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 31 deletions.
12 changes: 6 additions & 6 deletions packages/generate/src/syntax/collections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
Cardinality,
ExpressionKind,
TypeKind,
typeutil,
type typeutil,
} from "edgedb/dist/reflection/index";
import { cardutil } from "./cardinality";
import type {
Expand All @@ -24,14 +24,14 @@ import type {
TypeSet,
} from "./typesystem";

import { $expressionify, ExpressionRoot } from "./path";
import { $expressionify, type ExpressionRoot } from "./path";
import type { getCardsFromExprs } from "./set";
import {
literalToScalarType,
type literalToScalarType,
literalToTypeSet,
mapLiteralToTypeSet,
orScalarLiteral,
scalarLiterals,
type mapLiteralToTypeSet,
type orScalarLiteral,
type scalarLiterals,
} from "./castMaps";

const indexSliceRegx = /^(-?\d+)(?:(:)(-?\d+)?)?|:(-?\d+)$/;
Expand Down
2 changes: 1 addition & 1 deletion packages/generate/src/syntax/insert.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
Cardinality,
ExpressionKind,
typeutil,
type typeutil,
TypeKind,
} from "edgedb/dist/reflection/index";
import type {
Expand Down
2 changes: 1 addition & 1 deletion packages/generate/src/syntax/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
// PropertyDesc,
Cardinality,
// BaseType,
typeutil,
type typeutil,
} from "edgedb/dist/reflection/index";

import { cardutil } from "./cardinality";
Expand Down
2 changes: 1 addition & 1 deletion packages/generate/src/syntax/range.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import type { literalToScalarType, orScalarLiteral } from "./castMaps";
import { literalToTypeSet } from "./castMaps";
import { spec } from "./__spec__";
import { literal, $nameMapping } from "./literal";
import { $expr_Function, $resolveOverload } from "./funcops";
import { type $expr_Function, $resolveOverload } from "./funcops";
import { $expressionify } from "./path";

type $anypoint =
Expand Down
12 changes: 6 additions & 6 deletions packages/generate/src/syntax/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@ import type {

import {
$assert_single,
$expr_PathLeaf,
$expr_PathNode,
$linkPropify,
ExpressionRoot,
type $expr_PathLeaf,
type $expr_PathNode,
type $linkPropify,
type ExpressionRoot,
} from "./path";
import type { anonymizeObject } from "./casting";
import { $expressionify, $getScopedExpr } from "./path";
import { $getTypeByName, literal } from "./literal";
import { spec } from "./__spec__";
import {
scalarLiterals,
literalToScalarType,
type scalarLiterals,
type literalToScalarType,
literalToTypeSet,
} from "./castMaps";
import type { $expr_Operator } from "./funcops";
Expand Down
2 changes: 1 addition & 1 deletion packages/generate/src/syntax/set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import type {
SomeType,
} from "./typesystem";

import { $mergeObjectTypes, mergeObjectTypes } from "./hydrate";
import { $mergeObjectTypes, type mergeObjectTypes } from "./hydrate";

import * as castMaps from "./castMaps";

Expand Down
20 changes: 10 additions & 10 deletions packages/generate/src/syntax/toEdgeQL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ import {
util,
} from "edgedb/dist/reflection/index";
import {
$expr_Array,
$expr_NamedTuple,
$expr_Tuple,
$expr_TuplePath,
BaseType,
EnumType,
type $expr_Array,
type $expr_NamedTuple,
type $expr_Tuple,
type $expr_TuplePath,
type BaseType,
type EnumType,
isArrayType,
isNamedTupleType,
isObjectType,
isTupleType,
ObjectType,
ObjectTypeSet,
RangeType,
TypeSet,
type ObjectType,
type ObjectTypeSet,
type RangeType,
type TypeSet,
} from "./typesystem";
import type { $expr_Literal } from "./literal";
import type {
Expand Down
10 changes: 5 additions & 5 deletions packages/generate/src/syntax/update.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
ExpressionKind,
typeutil,
type typeutil,
Cardinality,
} from "edgedb/dist/reflection/index";
import type {
Expand All @@ -17,13 +17,13 @@ import type {
import type { pointerToAssignmentExpression } from "./casting";
import { $expressionify, $getScopedExpr, $assert_single } from "./path";
import {
SelectModifiers,
NormalisedSelectModifiers,
ComputeSelectCardinality,
type SelectModifiers,
type NormalisedSelectModifiers,
type ComputeSelectCardinality,
$existingScopes,
$handleModifiers,
} from "./select";
import { $normaliseInsertShape, pointerIsOptional } from "./insert";
import { $normaliseInsertShape, type pointerIsOptional } from "./insert";

/////////////////
/// UPDATE
Expand Down

0 comments on commit 4b01e37

Please sign in to comment.