Skip to content

Commit f346519

Browse files
committed
Fix (future) declaring TS types for scalars that extend other scalars
They don't have a previous entry to modify.
1 parent 6fbe87c commit f346519

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/core/edgedb/generator/scalars.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { scalarToLiteralMapping } from '@edgedb/generate/dist/genutil.js';
22
import { mapEntries } from '@seedcompany/common';
3+
import { set } from 'lodash';
34
import { codecs } from '../codecs';
45

56
export const customScalars = mapEntries(codecs, (codec) => [
@@ -11,6 +12,6 @@ export function setTsTypesFromOurScalarCodecs() {
1112
// this is used for schema interfaces & query builder
1213
for (const { info } of codecs) {
1314
const fqName = `${info.module}::${info.type}`;
14-
scalarToLiteralMapping[fqName].type = info.ts;
15+
set(scalarToLiteralMapping, [fqName, 'type'], info.ts);
1516
}
1617
}

0 commit comments

Comments
 (0)