Skip to content

bad transform of fake this param #71

@patricklx

Description

@patricklx
const { Preprocessor } = require('content-tag');

const p = new Preprocessor();

const res = p.process(`
f = function(this: Context, ...args) {
    function t(this: Context, ...args) {};
    <template></template>
}`);

console.log(res);

results to

import { template } from "@ember/template-compiler";
f = function(this: Context, ...args) {
   function t(this1: Context, ...args1) {}
   ;
   template(``, {
       eval () {
           return eval(arguments[0]);
       }
   });
};

removing the template will make it work correctly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions