We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Great project! I wish I had something similar when I was debating.
In types.ts, it looks like you're using 1-tuples of 3-tuples to model rich text annotations:
types.ts
logos-web/lib/types.ts
Line 20 in 21d72af
But from inspecting the API response, it looks like the intent is to model highlights as an array of 3-tuples:
I believe the current types conflate syntax for tuples and arrays:
T[]
Array<T>
T
[T]
In this case, it may be more appropriate to model these types as arrays of 3-tuples:
export type Card = { … body: string[], emphasis: [number, number, number][], // or Array<[number, number, number]> highlights: [number, number, number][], underlines: [number, number, number][], cite_emphasis?: [number, number][], … }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Great project! I wish I had something similar when I was debating.
In
types.ts
, it looks like you're using 1-tuples of 3-tuples to model rich text annotations:logos-web/lib/types.ts
Line 20 in 21d72af
But from inspecting the API response, it looks like the intent is to model highlights as an array of 3-tuples:
I believe the current types conflate syntax for tuples and arrays:
T[]
orArray<T>
denotes an array ofT
[T]
denotes a 1-tuple with memberT
(see TypeScript docs on Arrays)In this case, it may be more appropriate to model these types as arrays of 3-tuples:
The text was updated successfully, but these errors were encountered: