Skip to content

Commit

Permalink
fixed docs for deno (kysely-org#938)
Browse files Browse the repository at this point in the history
Co-authored-by: Igal Klebanov <[email protected]>
  • Loading branch information
2 people authored and thecodrr committed Sep 3, 2024
1 parent 6524651 commit 5c12fb3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion site/docs/getting-started/Instantiation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ function getDialectSpecificCodeSnippet(
const driverNPMPackageName = getDriverNPMPackageNames(packageManager)[dialect]
const dialectClassName = DIALECT_CLASS_NAMES[dialect]
const poolClassName = 'Pool'
const poolClassImport = packageManager === 'deno' ? poolClassName : `{ ${poolClassName} }`

if (dialect === 'postgresql') {
return `import { ${poolClassName} } from '${driverNPMPackageName}'
return `import ${poolClassImport} from '${driverNPMPackageName}'
import { Kysely, ${dialectClassName} } from 'kysely'
const dialect = new ${dialectClassName}({
Expand Down

0 comments on commit 5c12fb3

Please sign in to comment.