Comments (3)
Per CR comments, the fix breaks this (bad) code from 1.0:
class C { get f() { return; } }
from typescript.
To be clear, the old compiler was okay with
function foo(): number {
return;
}
as well.
Well, I wouldn't say that fixing this bug is a breaking change; rather, I misunderstood the issue with this bug in Pull Request #147. I thought that we should be looking for return expressions rather than statements; however, I think it's worth asking if that's the correct behavior.
from typescript.
I've opened up #162 to discuss this.
from typescript.
Related Issues (20)
- interface&type inference HOT 2
- Exported types in an ESM namespace are not "nameable" (have repro) HOT 1
- Type narrow not worked with this union type. HOT 2
- TS Server Plugin rename supoort transform user input
- type of FetchEvent.handled shold be Promise<undefined> not Promise<void>; HOT 3
- `jsconfig.*.json` don't have `"allowJs": true` by default HOT 5
- Strange vscode typescript intellisense bug. HOT 2
- `Object.groupBy` should not return `Partial<Record<string, T>>` or `Partial<Record<number, T>>` HOT 2
- False negative on exhaustive type guard on multilevel union HOT 1
- Monorepo workspace packages in devDependencies are not considered for auto-imports HOT 1
- Mangling interface bindings to indicate identifier type HOT 3
- Resolution order dependent circular heritage
- Add option to remove "move to new file" quick fix
- Missing Intl.Locale.prototype.getWeekInfo() HOT 1
- `using` transform throws when a for body binding shadows the for head binding HOT 4
- Function definition parameter type inference HOT 2
- Double initializing a `readonly` field should not be allowed HOT 2
- `tsc --build --watch` produces stray `.js`/`.js.map` files when adding a file to upstream project
- Emitted declarations for JS file do not import a class if it's re-exported
- Type assertion of readonly array property doesn't work only with a class type (static property). HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typescript.