Skip to content

Conversation

@Eyas
Copy link
Collaborator

@Eyas Eyas commented Jul 31, 2021

Schema.org Numbers, Integers, and Floats support being assigned to
strings with the appropriate fromat (e.g. "4394" for Integer). With
TypeScript 4.1.0 and beyond, this can be expressed with the
`${number}` type. This pushes the minimum required version for
schema-dts from 3.4.0 to 4.1.0, and is thus a breaking change.

Note there's a future situation where we would RESTRICT the Integer
type further; so that only valid integral numbers are assignable to it.
This will be another breaking change for another time, when TypeScript
can finally represent this.

Fixes #130.

Schema.org Numbers, Integers, and Floats support being assigned to
strings with the appropriate fromat (e.g. "4394" for Integer). With
TypeScript 4.1.0 and beyond, this can be expressed with the
`` `${number}` `` type. This pushes the minimum required version for
schema-dts from 3.4.0 to 4.1.0, and is thus a breaking change.

Note there's a future situation where we would RESTRICT the `Integer`
type further; so that only valid integral numbers are assignable to it.
This will be another breaking change for another time, when TypeScript
can finally represent this.

Fixes google#130.
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.

Type errors against Google's recommended Schema JSON-LD's

1 participant