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

Add type for schema #129

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

Conversation

willsmanley
Copy link
Contributor

I know this isn't 100% right because it is causing a few dozen typescript errors, but I think it is important to assign & export a type to Entity.schema.

I'm using eslint rules that prohibit unsafe any usage and it seems that the schema property is generally well-defined.

@willsmanley willsmanley marked this pull request as draft January 15, 2021 12:52
@rbdmorgan
Copy link
Contributor

@willsmanley might be fighting a losing battle here as any is used extensively throughout the codebase, I think because it was initially developed in JS, then partially migrated to TS. You might be able to "fix" the schema type but then you just run into a bunch of downstream typing issues that you'll probably never be able to resolve without rewriting most of the codebase!

Curious as to why you need to access the schema property? I wonder if it should even be public.

You do have type inference now which might help?

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.

None yet

2 participants