Hi!
It would be handy to have type annotations for this module.
Do you have any plans to rewrite it in TypeScript or provide d.ts file?
I have written some types for myself, and could either prepare PR for this repo or upload it to DefinitelyTyped.
Which approach would be better?
In case someone needs the types:
declare module '@sentry/cli' {
interface UploadSourceMapsOptions {
include: string[]
ignore?: string[]
ignoreFile?: string
rewrite?: boolean
sourceMapReference?: boolean
stripPrefix?: string[]
stripCommonPrefix?: boolean
validate?: boolean
urlPrefix?: string
urlSuffix?: string
ext?: string[]
}
export default class SentryCli {
constructor(configFile?: string, options?: Record<string, any>)
releases: {
new (release: string): Promise<string | undefined>
finalize(release: string): Promise<string | undefined>
proposeVersion(): Promise<string>
uploadSourceMaps(
release: string,
options: UploadSourceMapsOptions
): Promise<Array<string | undefined>>
}
}
}
Sorry for such a long response, it'd be great if someone could provide those types. We can host them here, directly in the repo :)
@sameoldmadness I extended this out with the comments and extra comments I saw in index.js and releases/index.js in https://github.com/getsentry/sentry-cli/tree/master/js
https://gist.github.com/vdh/905e063b03c58166c21c25d1dbb9d663
I could keep going and type it out further, but it feels like this would be a lot more streamlined if the existing files were converted to Typescript because I was doing a lot of copy/pasting of the existing doc blocks.
Here we are, in 2021, and no type definitions for sentry-cli.
Right? So many people using it, yet so few wanting to help.
Yeah it's not like some people were getting paid to improve it
Most helpful comment
Here we are, in 2021, and no type definitions for sentry-cli.