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
Currently there are two ways of specifying return error types
// 1 export function serviceCreatePost( article: string, ): Result<Post, 'InternalServerError' | 'BadRequest'> {} // 2 export const serviceCreatePostAutoErrorKind = ((article: string) => {}) satisfies (article: string) => Result<Post, IHttpErrorKind>
Notice the second function doesn't explicitly state error kind and thus is easier to work with for large and diverse functions.
But this is a hack and syntax is cumbersome, a real method will only come to fruition after TypeScript/satifies on return type or TypeScript/satisfies on function is resolve until then I am using explicit. Please go show some love to these issues
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently there are two ways of specifying return error types
Notice the second function doesn't explicitly state error kind and thus is easier to work with for large and diverse functions.
But this is a hack and syntax is cumbersome, a real method will only come to fruition after TypeScript/satifies on return type or TypeScript/satisfies on function is resolve until then I am using explicit. Please go show some love to these issues
The text was updated successfully, but these errors were encountered: