@ 261027.7 · fetching
current
exports[`erasable namespaces and modules should be supported 1`] = `
";                 "
`;

exports[`erasable namespaces and modules should be supported 2`] = `
";                   \\n    \\t\\t                \\n\\n    \\t\\t                           \\n\\n   \\t\\t\\t                     \\n\\n\\t\\t\\t                        \\n\\t\\t\\t\\t                  \\n\\t\\t\\t \\n\\t\\t "
`;

exports[`erasable namespaces and modules should be supported 3`] = `
";                            \\n    \\t\\t                         \\n\\t\\t "
`;

exports[`erasable namespaces and modules should be supported 4`] = `
";                                       "
`;

exports[`should handle User type and isAdult function 1`] = `
"\\n    ;            \\n                   \\n                  \\n      \\n\\n    function isAdult(user      )          {\\n      return user.age >= 18;\\n    }\\n  "
`;

exports[`should handle advanced type-level constructs 1`] = `
"\\n\\t\\t;                               \\n\\n\\t\\t                                                                     \\n\\n\\t\\t                        \\n\\n\\t\\t                                          \\n\\t\\t                        \\n\\n\\t\\t                     \\n\\t"
`;

exports[`should handle class modifiers 1`] = `
"\\n\\t\\tclass PrivateConstructor {\\n\\t\\t          constructor() {}\\n\\t\\t         a() {}\\n\\t\\t            b() {}\\n\\t\\t  static create() {\\n\\t\\t    return new PrivateConstructor()\\n\\t\\t  }\\n\\t\\t}\\n\\n\\t\\tconst ins = PrivateConstructor.create()\\n\\t\\tconsole.log(ins)\\n\\t"
`;

exports[`should not break on return new line when stripped (alternative formatting) 1`] = `
"\\n\\tfunction mkId() {\\n\\t\\treturn (\\n\\t\\t\\t \\n\\t\\t  x   )=>x;\\n\\t}\\n\\tconst id = mkId();\\n\\toutput = id(7);"
`;

exports[`should not break on return new line when stripped 1`] = `
"\\n\\tfunction mkId() {\\n\\t\\treturn (  \\n\\t\\t\\t x   )=>x;\\n\\t}\\n\\tconst id = mkId();\\n\\toutput = id(5);"
`;

exports[`should not throw on return new line when stripped 1`] = `
"\\n\\tfunction mkId() {\\n\\t\\tthrow (\\n\\t\\t\\t \\n\\t\\t  x   )=>x;\\n\\t}\\n\\n\\ttry {\\n\\t\\tmkId();\\n\\t}\\n\\tcatch(e){\\n\\t\\toutput = e(5);\\n\\t}"
`;

exports[`should not throw on yield new line when stripped 1`] = `
"\\n\\tfunction* mkId() {\\n\\t\\tyield (\\n\\t\\t\\t\\t \\n\\t\\t  x   )=>x;\\n\\t}\\n\\toutput= mkId().next().value(5);"
`;

exports[`should perform type stripping 1`] = `
"const foo         = 'bar';"
`;

exports[`should perform type stripping on nested generics 1`] = `
"const promiseWrapper = new Wrapper                         (Promise.resolve.bind(Promise));"
`;

exports[`should preserve import/export type declarations 1`] = `
"\\n\\t\\t;                                       \\n\\t\\t                         \\n\\t"
`;

exports[`should strip 'satisfies' expressions 1`] = `
"\\n\\t\\tconst user = {\\n\\t\\t\\tname: \\"Alice\\",\\n\\t\\t\\tage: 30,\\n\\t\\t}                                        ;\\n\\t"
`;

exports[`should strip correctly private properties overload 1`] = `
"class Private {\\n\\t\\t                          \\n\\t\\t                          \\n\\t\\t                                            \\n\\t\\t#foo(bar                 )                  {\\n\\t\\t\\treturn bar;\\n\\t\\t}\\n\\t}"
`;

exports[`should strip type annotations from arrow functions 1`] = `
"\\n    const greet = (name        )       => {\\n      console.log(name);\\n    };\\n  "
`;

exports[`should strip type annotations from classes 1`] = `
"\\n    class MyClass {\\n      myMethod(param        )         {\\n        return param.toString();\\n      }\\n    }\\n  "
`;

exports[`should strip type annotations from functions 1`] = `
"function greet(name        )       { console.log(name); }"
`;

exports[`should strip type annotations from generics 1`] = `
"\\n    function identity   (arg   )    {\\n      return arg;\\n    }\\n  "
`;

exports[`should strip type annotations from interfaces 1`] = `
"\\n    ;                      \\n                                      \\n     \\n  "
`;

exports[`should strip type annotations from type aliases 1`] = `
"\\n    ;                             \\n  "
`;

exports[`should strip type annotations from type assertions 1`] = `
"\\n    let someValue      = \\"this is a string\\";\\n    let strLength         = (someValue          ).length;\\n  "
`;