Thanks to visit codestin.com
Credit goes to github.com

Skip to content

db-connection.ts doesn't import some types #199

@alexkreidler

Description

@alexkreidler

Got a bunch of errors like:

yarn run v1.22.10
$ ts-node-dev --max-http-header-size=65536 src/index.ts
[INFO] 22:40:55 ts-node-dev ver. 1.1.1 (using ts-node ver. 9.1.1, typescript ver. 3.9.7)
Compilation error in /home/alex/c2/scholarphi/api/src/db-connection.ts
[ERROR] 22:40:57 ⨯ Unable to compile TypeScript:
src/db-connection.ts:59:34 - error TS2304: Cannot find name 'LogEntryRow'.

59   async insertLogEntry(logEntry: LogEntryRow) {
                                    ~~~~~~~~~~~
src/db-connection.ts:157:27 - error TS2304: Cannot find name 'BoundingBoxRow'.

157     boundingBoxRows: Omit<BoundingBoxRow, "id">[]
                              ~~~~~~~~~~~~~~
src/db-connection.ts:174:35 - error TS2304: Cannot find name 'EntityDataRow'.

174   unpackEntityDataRows(rows: Omit<EntityDataRow, "id">[]) {
                                      ~~~~~~~~~~~~~

Fixed by exporting from types/db.ts and importing as such:

import {
  LogEntryRow,
  BoundingBoxRow,
  EntityDataRow,
  EntityRow,
  EntityDataRowType,
  EntityRowUpdates,
} from "./types/db";

PR to follow.

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