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
format
Currently when using the format function, the opts are typed as any which I think is unneeded.
opts
any
It could instead be like:
export type TransformFunction<T> = (info: TransformableInfo, opts?: T) => TransformableInfo | boolean; export function format<T>(transform: TransformFunction<T>): FormatWrap;
So as to keep full type support
interface Info { x?: string y: number } const doSmth = format<Info>((info, opts) => { if (opts.x) info.timestamp = x return info })
No response
type, types
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The vision
Currently when using the format function, the
opts
are typed asany
which I think is unneeded.It could instead be like:
So as to keep full type support
Use case
Additional information
No response
🔎 Search Terms
type, types
The text was updated successfully, but these errors were encountered: