Sean Lee

Results 15 issues of Sean Lee

In the below example, `Object.getOwnPropertyDescriptor` is annotated with `@nosideeffects` in `es5.js`, but its calls are not removed. [closure-compiler-debugger](https://closure-compiler-debugger.appspot.com/#input0%3Dlet%2520a%2520%253D%2520Object.getOwnPropertyDescriptor%253B%250A%250Alet%2520b%2520%253D%2520Object.getOwnPropertyDescriptor(Object.prototype%252C%2520'hasOwnProperty')%253B%250A%250Alet%2520c%2520%253D%2520a(Object.prototype%252C'__proto__').get%253B%26input1%26conformanceConfig%26externs%26refasterjs-template%26includeDefaultExterns%3Dtrue%26CHECK_TYPES%3Dtrue%26REWRITE_MODULES_BEFORE_TYPECHECKING%3Dtrue%26ALIAS_ALL_STRINGS%3Dtrue%26AMBIGUATE_PROPERTIES%3Dtrue%26COALESCE_VARIABLE_NAMES%3Dtrue%26COLLAPSE_VARIABLE_DECLARATIONS%3Dtrue%26COLLAPSE_ANONYMOUS_FUNCTIONS%3Dtrue%26COLLAPSE_PROPERTIES%3Dtrue%26COLLAPSE_OBJECT_LITERALS%3Dtrue%26COMPUTE_FUNCTION_SIDE_EFFECTS%3Dtrue%26CONVERT_TO_DOTTED_PROPERTIES%3Dtrue%26CROSS_CHUNK_CODE_MOTION%3Dtrue%26CROSS_CHUNK_METHOD_MOTION%3Dtrue%26DEAD_ASSIGNMENT_ELIMINATION%3Dtrue%26DEVIRTUALIZE_METHODS%3Dtrue%26DISAMBIGUATE_PROPERTIES%3Dtrue%26EXTRACT_PROTOTYPE_MEMBER_DECLARATIONS%3Dtrue%26FOLD_CONSTANTS%3Dtrue%26INLINE_CONSTANTS%3Dtrue%26INLINE_FUNCTIONS%3Dtrue%26INLINE_PROPERTIES%3Dtrue%26INLINE_VARIABLES%3Dtrue%26LABEL_RENAMING%3Dtrue%26OPTIMIZE_CALLS%3Dtrue%26OPTIMIZE_CONSTRUCTORS%3Dtrue%26OPTIMIZE_ARGUMENTS_ARRAY%3Dtrue%26REMOVE_ABSTRACT_METHODS%3Dtrue%26REMOVE_DEAD_CODE%3Dtrue%26REMOVE_UNUSED_CLASS_PROPERTIES%3Dtrue%26REMOVE_UNUSED_PROTOTYPE_PROPERTIES%3Dtrue%26REMOVE_UNUSED_VARIABLES%3Dtrue%26REWRITE_FUNCTION_EXPRESSIONS%3Dtrue%26SMART_NAME_REMOVAL%3Dtrue%26USE_TYPES_FOR_LOCAL_OPTIMIZATION%3Dtrue%26VARIABLE_RENAMING%3Dtrue%26PROPERTY_RENAMING%3Dtrue%26MOVE_FUNCTION_DECLARATIONS%3Dtrue%26SYNTHETIC_BLOCK_MARKER%3Dtrue%26CLOSURE_PASS%3Dtrue%26PRESERVE_TYPE_ANNOTATIONS%3Dtrue%26PRETTY_PRINT%3Dtrue) ```js let a = Object.getOwnPropertyDescriptor; let b = Object.getOwnPropertyDescriptor(Object.prototype, 'hasOwnProperty'); let c...

a.js ```js goog.module('a'); import('./b.js').then(out => { console.log(out.b); }); ``` b.js ```js goog.module('b'); /** @type {number} */ exports.b = 1; ``` compiler flags ``` --language_in=ECMASCRIPT_2020 --language_out=ECMASCRIPT_2020 --chunk_output_type=ES_MODULES --emit_use_strict=false --js=b.js --chunk=b_out:1 --js=a.js...

Since Closure Compiler 20210505.0.0, it now supports dynamic imports, and producing chunks in ES module format. Here I try to describe an intended behavior of tscc for dynamic imports. ###...

enhancement

When an external module was encountered, whose global alias name isn't provided in the spec file but its type declaration contains `export as namespace foo` statement, we can automatically use...

enhancement

There have been several reported compilation errors caused by feeding "script"s, a recent one being https://github.com/theseanl/tscc/issues/380. It'd be helpful for debugging to print some warnings about usage of non-modules with...

enhancement

`@define` in Closure compiler is like environment variables in other build tools. It is a common practice for webpack or rollup to access environment variables in source code (`process.env.NODE_ENV`), so...

enhancement

I've always wished Closure Stylesheets would have such a feature – it could rename [css variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties) and emit it in a call `goog.setCssNameMapping` just like other class names, so that...

enhancement

[Whale browser](https://whale.naver.com/en/) is based on Chromium, is run by [Naver](https://en.wikipedia.org/wiki/Naver_Corporation), and has a noticeable market share of [%6](https://gs.statcounter.com/browser-market-share/desktop/south-korea) in South Korea. Similar to Edge, it supports installing extensions from CWS...

It seems that now [esbuild](https://esbuild.github.io/) provides pretty much everything we need from rollup. If it does, it should be possible to port `rollup-plugin-tscc` to esbuild. - esbuild code splitting api...

enhancement

Emitting ES6 modules is being worked in https://github.com/theseanl/tscc/pull/723 (__Disclaimer__ It doesn't preserve `export` statements in entry files, `import` and `export` statements are only used for inter-chunk references.) It currently works...

enhancement