Skip to content
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

fix(48907): Fix first parameter's type of JSON.parse, and fix jsdoc. #48908

Closed
wants to merge 1 commit into from

Conversation

dev-itsheng
Copy link
Contributor

Fixes #48907

@typescript-bot
Copy link
Collaborator

It looks like you've sent a pull request to update our 'lib' files. These files aren't meant to be edited by hand, as they consist of last-known good states of the compiler and are generated from 'src/lib' or possibly our lib generator. Unless this is necessary, consider closing the pull request and sending a separate PR to update 'src/lib' or https://github.com/microsoft/TypeScript-DOM-lib-generator

@typescript-bot typescript-bot added lib update PR modifies files in the `lib` folder For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels May 1, 2022
@dev-itsheng
Copy link
Contributor Author

It looks like you've sent a pull request to update our 'lib' files. These files aren't meant to be edited by hand, as they consist of last-known good states of the compiler and are generated from 'src/lib' or possibly our lib generator. Unless this is necessary, consider closing the pull request and sending a separate PR to update 'src/lib' or https://github.com/microsoft/TypeScript-DOM-lib-generator

I modified the wrong file the first time, so I reversed the previous modification, re-repaired the files under src/lib, and did a force push

* @param reviver A function that transforms the results. This function is called for each member of the object.
* If a member contains nested objects, the nested objects are transformed before the parent object is.
*/
parse(text: string, reviver?: (this: any, key: string, value: any) => any): any;
parse(text: any, reviver?: (this: any, key: string, value: any) => any): any;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type is intentionally not any. See #11842.

@dev-itsheng
Copy link
Contributor Author

I've explained it in the Issue, so let's end it.

I'll contribute to other parts of TypeScript when I get a chance.

@dev-itsheng dev-itsheng closed this May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Uncommitted Bug PR for untriaged, rejected, closed or missing bug lib update PR modifies files in the `lib` folder
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JSON: more general type of JSON.parse()
3 participants