-
Notifications
You must be signed in to change notification settings - Fork 12.3k
New issue
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
In JSDoc @type is not a type declaration, which it is much more like type conversion. #39650
Comments
Here's a repro: // filename: index.js
// @ts-check
/** @typedef Entity
* @property {string} prop
*/
/**
* @type {{[key in keyof Entitiy] : any }}
*/
const e = {
prop: 1233,
s: ""
} |
Hello, we are a group of researchers developing machine learning techniques to locate issues suitable for newcomers, and our model considers this issue as likely a "good first issue". May we recommend you to label it as "good first issue" so newcomers know where to choose? Thank you! |
👋 Hi, I'm the Repro bot. I can help narrow down and track compiler bugs across releases! This comment reflects the current state of this repro running against the nightly TypeScript. 👍 Compiled Historical Information
|
There is typo in @orta 's repro code as far as I can understand. - * @type {{[key in keyof Entitiy] : any }}
+ * @type {{[key in keyof Entity] : any }} |
I don't kown whether its a bug or feature.
In Javascript, actually i need an error emit which
![image](https://user-images.githubusercontent.com/5752183/87844822-db4baf80-c8f3-11ea-8ca1-9227aa73db93.png)
other_props
is not inEntity
In Typescript,
![image](https://user-images.githubusercontent.com/5752183/87844886-4e552600-c8f4-11ea-978c-e10ac028d5a6.png)
entityB
act just same as the Javascript codes aboveThe text was updated successfully, but these errors were encountered: