Skip to content

Commit

Permalink
fix(schema): add pure annotation to makeTableRef calls
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson committed Sep 10, 2022
1 parent 6bda852 commit ff7043c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions packages/tusken-schema/src/typescript/generateNativeFuncs.ts
@@ -1,7 +1,6 @@
import endent from 'endent'
import type { NativeFunc } from '../extract/extractFuncs'

const __PURE__ = '/*#__PURE__*/'
import { __PURE__ } from '../utils/syntax'

export function generateNativeFuncs(
nativeFuncs: NativeFunc[],
Expand Down
3 changes: 2 additions & 1 deletion packages/tusken-schema/src/typescript/generateSchema.ts
Expand Up @@ -5,6 +5,7 @@ import path from 'path'
import { ClientConfig } from '../config'
import { dataToEsm } from '../utils/dataToEsm'
import { mergeImports, serializeImports } from '../utils/imports'
import { __PURE__ } from '../utils/syntax'
import { GeneratedLines } from './generateNativeTypes'
import { reservedWords } from './reservedWords'

Expand Down Expand Up @@ -61,7 +62,7 @@ export function generateTypeSchema(
${renderColumns(table.columns)}
}, "${table.name}", ${pkColumn}, ${
optionColumns.map(quoted).join(' | ') || '""'
}> = makeTableRef("${table.name}", [${allColumns
}> = ${__PURE__} makeTableRef("${table.name}", [${allColumns
.map(quoted)
.join(', ')}], ${pkColumn})
`
Expand Down
1 change: 1 addition & 0 deletions packages/tusken-schema/src/utils/syntax.ts
@@ -0,0 +1 @@
export const __PURE__ = '/*#__PURE__*/'

0 comments on commit ff7043c

Please sign in to comment.