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
When I was using tiletype I noticed the types are getting mixed up (string | boolean).
string
boolean
Causes errors when a type is meant to be string.
type Formats = 'jpg' | 'png' const format: Formats = tiletype.type(buffer)
or
const format: string = tiletype.type(buffer)
Switching the return results to undefined should not break any libraries that tested for unknown buffer types.
undefined
This would still be valid
const format = tiletype.type(buffer) if (format) { console.log('format exists!') }
const format = tiletype.type(buffer) | 'png'
Ran the tiletype tests and everything looked good, the only minor changes was handling the tiletype.headers function with undefined.
tiletype.headers
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Pull Request #16
When I was using tiletype I noticed the types are getting mixed up (
string
|boolean
).Causes errors when a type is meant to be string.
or
Switching the return results to
undefined
should not break any libraries that tested for unknown buffer types.This would still be valid
or
Ran the tiletype tests and everything looked good, the only minor changes was handling the
tiletype.headers
function withundefined
.The text was updated successfully, but these errors were encountered: