Skip to content

Typescript build error when using package #120

Closed
@jbellos

Description

@jbellos

npm install @duckdb/[email protected]
using typescript 4.6.4

create a new class:

import { DuckDBInstance } from '@duckdb/node-api';

export class DuckDbPostalAddressRepository {
    private _instance?: DuckDBInstance;

    private async _setupDataSource(): Promise<void> {
        if (!this._instance) {
            this._instance = await DuckDBInstance.create(':memory:');
        }
    }
}

compile with npm run tsc

../node_modules/@duckdb/node-api/lib/DuckDBLogicalType.d.ts:16:9 - error TS2380: The return type of a 'get' accessor must be assignable to its 'set' accessor type
  Type 'undefined' is not assignable to type 'string'.

16     get alias(): string | undefined;
           ~~~~~


Found 1 error in ../node_modules/@duckdb/node-api/lib/DuckDBLogicalType.d.ts:16

If you need my tsconfig file let me know.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions