-
-
Notifications
You must be signed in to change notification settings - Fork 5
feat: validate type comments and generate .d.ts
(take 2)
#251
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice to me!
Could we publish a prerelease with this so I can give it a little whirl in https://github.com/eslint-community/eslint-plugin-n? Or do you think its
/** @typedef {import("eslint").Scope.Scope} Scope */ | ||
/** @typedef {import("eslint").Scope.Variable} Variable */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question(non-blocking): Does the @import
tag work here?
/**
* @import { Scope } from "eslint"
* @import { Identifier } from "estree"
*/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export type TraceMap<T = unknown> = { | ||
[i: string]: TraceMapObject<T> | ||
} | ||
|
||
export type TraceMapObject<T> = { | ||
[i: string]: TraceMapObject<T> | ||
[CALL]?: T | ||
[CONSTRUCT]?: T | ||
[READ]?: T | ||
[ESM]?: boolean | ||
} | ||
|
||
export type TrackedReferences<T> = { | ||
info: T | ||
node: Rule.Node | ||
path: string[] | ||
type: typeof CALL | typeof CONSTRUCT | typeof READ | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💜 Thank you
🎉 This PR is included in version 4.6.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This PR makes the same change as #204 to generate types from JSDoc.
The difference from #204 is that it has been changed to work with Node v12, so there are no breaking changes in this PR.
fixes #150
closes #60
closes #204