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

Resolve TS compiler errors #192

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Resolve TS compiler errors #192

wants to merge 2 commits into from

Conversation

markborkum
Copy link
Collaborator

@markborkum markborkum commented May 16, 2024

Resolves #15, resolves #128.

For the "wrapper" components, the error was that the attachments object did not accept keys of the string type, but the value of the id_ref variable was of the string type. I resolved these errors by replacing the [] index operator with the Object.getOwnPropertyDescriptor function.

For the error with the top-level await statement in the src/templates/projects_config.ts file, I bumped the compiler target to es2017.

Finally, the remaining errors were all variables with the implicit any type, which I made explicit. These could be improved by typing the output of the PouchDB.Database<T>.get function.

For the "wrapper" components, the error was that the `attachments` object did not accept keys of the `string` type, but the value of the `id_ref` variable was of the `string` type. I resolved these errors by replacing the `[]` index operator with the `Object.getOwnPropertyDescriptor` function.

For the error with the top-level `await` statement in the `src/templates/projects_config.ts` file, I bumped the compiler target to `es2017`.

Finally, the remaining errors were all variables with the implicit `any` type, which I made explicit. These could be improved by typing the output of the `PouchDB.Database<T>.get` function.
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

Successfully merging this pull request may close these issues.

PouchDB Type Errors Resolve Typescript Errors
1 participant