mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
If you're doing anything interesting within `Server.shouldHandle` it's probably going to involve database queries, crypto hashing, or other features that are generally provided asynchronously. Changing the signature to allow `boolean | Promise<boolean>` fixes the compiler error that occurs if you attempt to assign an async function to `shouldHandle` (async functions must return promises, but then the function signature doesn't match). |
||
|---|---|---|
| .. | ||
| index.d.ts | ||
| tsconfig.json | ||
| tslint.json | ||
| ws-tests.ts | ||