trullock / NUglify

NUglify is a HTML, JavaScript and CSS minification Library for .NET (fork of AjaxMin + new features)
Other
394 stars 78 forks source link

"Setter must have a single parameter" for "set" functions in classes that aren't setters. #215

Closed rwasef1830 closed 3 years ago

rwasef1830 commented 3 years ago

Hello, Example in this function: https://github.com/matteobruni/tsparticles/blob/4340750b22588bc764845f58b2848377b20ca9ee/core/main/src/Core/Loader.ts#L71

It is minified fine and works in the browser, however it generates error JS1315 setter must have a single formal parameter when it is actually not a setter... just a function called "set".

trullock commented 3 years ago

Thanks for the report. Can you provide a succinct JavaScript example of the error you are experiencing?

rwasef1830 commented 3 years ago

@trullock

export class Loader {
    set(not, a, setter) {
        alert(not + a + setter);
    }
}

will produce the error

trullock commented 3 years ago

Brilliant thanks.

I'm sure I fixed this recently.....

Will take a look asap

trullock commented 3 years ago

Has this come from BundlerMinifier? What version of NUglify are you using?

rwasef1830 commented 3 years ago

Yes, and I forked it, to use NUglify v1.11.5 I have a failing test case in master.

rwasef1830 commented 3 years ago

https://github.com/rwasef1830/NUglify/tree/bug-215 @trullock