Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

typescript errors #8

Open
Open
@andykais

Description

@andykais

Hi, I am attempting to run this library to do some benchmarking against other sqlite implementations. I cant get it to compile unfortunately, there are typescript errors present on main and on the x branch.

import { Connection } from "https://raw.githubusercontent.com/denodrivers/async-sqlite3/main/connection.ts"
Check file:///Users/andrew/Code/scratchwork/deno-benchmark-sqlite/bench.ts
error: TS2352 [ERROR]: Conversion of type 'void' to type 'null' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
  return _lib.symbols.fill_result(a0_buf, a0_buf.byteLength) as null
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://raw.githubusercontent.com/denodrivers/async-sqlite3/main/bindings/bindings.ts:61:10

TS2352 [ERROR]: Conversion of type 'void' to type 'null' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
  return _lib.symbols.get_last_error(a0_buf, a0_buf.byteLength) as null
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://raw.githubusercontent.com/denodrivers/async-sqlite3/main/bindings/bindings.ts:65:10

TS2305 [ERROR]: Module '"https://raw.githubusercontent.com/denodrivers/async-sqlite3/main/bindings/bindings.ts"' has no exported member 'Value'.
import { Value } from "./bindings/bindings.ts";
         ~~~~~
    at https://raw.githubusercontent.com/denodrivers/async-sqlite3/main/value.ts:1:10

TS2305 [ERROR]: Module '"https://raw.githubusercontent.com/denodrivers/async-sqlite3/main/bindings/bindings.ts"' has no exported member 'sqlite3_execute_sync'.
  sqlite3_execute_sync,
  ~~~~~~~~~~~~~~~~~~~~
    at https://raw.githubusercontent.com/denodrivers/async-sqlite3/main/connection.ts:8:3

TS2305 [ERROR]: Module '"https://raw.githubusercontent.com/denodrivers/async-sqlite3/main/bindings/bindings.ts"' has no exported member 'Value'.
  Value,
  ~~~~~
    at https://raw.githubusercontent.com/denodrivers/async-sqlite3/main/connection.ts:11:3

TS2305 [ERROR]: Module '"https://raw.githubusercontent.com/denodrivers/async-sqlite3/main/value.ts"' has no exported member 'fromValue'.
import { decodeArray, encode, fromValue, intoValue } from "./value.ts";
                              ~~~~~~~~~
    at https://raw.githubusercontent.com/denodrivers/async-sqlite3/main/connection.ts:13:31

TS2305 [ERROR]: Module '"https://raw.githubusercontent.com/denodrivers/async-sqlite3/main/value.ts"' has no exported member 'intoValue'.
import { decodeArray, encode, fromValue, intoValue } from "./value.ts";
                                         ~~~~~~~~~
    at https://raw.githubusercontent.com/denodrivers/async-sqlite3/main/connection.ts:13:42

TS2552 [ERROR]: Cannot find name 'decode'. Did you mean 'encode'?
    const error = decode(err_slice);
                  ~~~~~~
    at https://raw.githubusercontent.com/denodrivers/async-sqlite3/main/connection.ts:22:19

Found 8 errors.

my deno --version is the latest as of submitting this issue

deno 1.21.2 (release, x86_64-apple-darwin)
v8 10.0.139.17
typescript 4.6.2```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions