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

typescript errors #8

Open
andykais opened this issue May 6, 2022 · 0 comments
Open

typescript errors #8

andykais opened this issue May 6, 2022 · 0 comments

Comments

@andykais
Copy link

andykais commented May 6, 2022

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```
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant