Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
alexkreidler opened this issue Jan 12, 2021 · 0 comments
Open

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

alexkreidler opened this issue Jan 12, 2021 · 0 comments

Comments

@alexkreidler
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant