Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Wrong RawForeignKeySpec.timing type #166

Closed
theblang opened this issue Jun 25, 2016 · 3 comments
Closed

Wrong RawForeignKeySpec.timing type #166

theblang opened this issue Jun 25, 2016 · 3 comments

Comments

@theblang
Copy link

theblang commented Jun 25, 2016

I noticed that RawForeignKeySpec.timing is set to ConstraintAction. It appears in the tests that it should be ConstraintTiming. I submitted a PR at DefinitelyTyped; I wanted to make an issue here to ensure that the fix in my PR is indeed correct.

@theblang theblang changed the title Problem with RawForeignKeySpec.timing type Wrong RawForeignKeySpec.timing type Jun 25, 2016
@freshp86
Copy link
Contributor

Responded in the PR. The canonical source of truth for our Typescript definitions is at https://github.com/google/lovefield/blob/master/dist/lovefield.d.ts#L212-217. Thanks for noticing the discrepancy.

@theblang
Copy link
Author

theblang commented Jul 31, 2016

@freshp86 I saw this article, which seems to indicate that they are wanting to move away from any special type-fetching tool (like typings) altogether. It seems they have populated a @types npm package using type definitions currently in DefinitelyTyped. In this GitHub issue one of the Microsoft employees says that Publishing declaration files with your packages would be the preferred course of action. The problem with the type definition file that is included in Lovefield is that it won't work when trying to use it directly (with the files tsconfig property) because of the reference path on es6-promise. I was able to use the @types package to grab what I assume is a "built" version of the types or something, but it is out of date (doesn't include the ConstraintTiming change I made). Based on the comment from that Microsoft employee, I guess packaging the definition file with your package is a preferred way to distribute your definition file, but I am not sure what processing occurred to produce a definition file that does not reference another one.

@arthurhsu
Copy link
Contributor

Native TypeScript support is planned and will be announced when we feel it's ready. Closing this issue for now.

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

3 participants