mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
17 lines
309 B
TypeScript
17 lines
309 B
TypeScript
import * as commentJson from 'comment-json';
|
|
|
|
const result = commentJson.parse(`
|
|
/**
|
|
block comment at the top
|
|
*/
|
|
// comment at the top
|
|
{
|
|
// comment for a
|
|
// comment line 2 for a
|
|
/* block comment */
|
|
"a": 1 // comment at right
|
|
}
|
|
// comment at the bottom
|
|
`);
|
|
const str = commentJson.stringify(result);
|