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
demands and ensures maybe, but what does rescue look like? invariant seems pointless.
demands
ensures
rescue
invariant
Does anything apply to closures specifically?
Something like:
const squareContract = new FunctionContract<typeof square>({ demands(x) { return typeof x == 'number' }, ensures(result, [x]) { return result >= x } }) @Contracted(squareContract) function square(x){ return x**2 }
The text was updated successfully, but these errors were encountered:
mlhaufe
No branches or pull requests
demands
andensures
maybe, but what doesrescue
look like?invariant
seems pointless.Does anything apply to closures specifically?
Something like:
The text was updated successfully, but these errors were encountered: