3 ms·
Interestingly enough #1 seems more like another case of #2, because: let promisedString = new Promise<string>( resolve => { // Fails as expec
by svieira 10y ago
Interestingly enough #1 seems more like another case of #2, because:
let promisedString = new Promise<string>(
resolve => {
// Fails as expected in TypeScript!
resolve(42)
}
)
- andreypopp 10y agoNot sure — TS doesn't report any errors in the original code so I assume it thinks code is fine but it is not. That's totally different than #2.