mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-02-12 11:52:44 +00:00
12 lines
535 B
TypeScript
12 lines
535 B
TypeScript
import decomment = require('decomment');
|
|
const code = '/* comment */\r\n\r\n var test = 123';
|
|
decomment(code); // $ExpectType string
|
|
decomment(code, { space: true }); // $ExpectType string
|
|
decomment(code, { ignore: /\/\*\*\s*\n([^\*]|(\*(?!\/)))*\*\//g }); // $ExpectType string
|
|
decomment(code, { trim: true }); // $ExpectType string
|
|
|
|
const text = '.my-class{color:Red;}// comments';
|
|
decomment.text(text); // $ExpectType string
|
|
decomment.html(text, { space: true }); // $ExpectType string
|
|
decomment.getEOL(text); // $ExpectType string
|