Skip to content

Conversation

sandersn
Copy link
Member

This reverts commit c7f49bc because of breaks like these found in github repositories:

function x(obj: object, key: string) {
    encodeURIComponent(JSON.stringify(obj[key as keyof typeof obj]))
}
function y(value: string) {
    if (typeof value !== 'string') {
        value = JSON.stringify(value)
    }
}
function z(file: PathOrFileDescriptor, obj: any, options: WriteFileOptions) {
    writeFileSync(file, JSON.stringify(obj, options?.replacer, options?.spaces), options)
}

(The last example depends on @types/fs-extra)

Discussed at the January 18 design meeting.

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Jan 19, 2023
@sandersn sandersn merged commit ecaf6d9 into microsoft:main Jan 19, 2023
@ecyrbe
Copy link

ecyrbe commented Jan 21, 2023

Will another fix for undefined be attempted ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants