Peter Burns

Results 156 comments of Peter Burns

Yeah, we need to update the TS version spread that we run unit tests on, but this is just for the vscode integration tests

Workaround: ```typescript function foo(name: T) { const nameStr: string = name; return html``; } ``` This leverages the TS type system to convert from T to string in a type...

The tricky thing about `@required` is that it's just a suggestion. There's lots of ways to create an element without specifying the fields, even within a pure LitElement app e.g....

For myself, I have the opposite problem @alhadis. There are files which I want excluded from git (because they are build artifacts, and so diffs etc aren't useful) but included...

Repro: https://closure-compiler.appspot.com/home#code%3D%252F%252F%2520%253D%253DClosureCompiler%253D%253D%250A%252F%252F%2520%2540compilation_level%2520SIMPLE_OPTIMIZATIONS%250A%252F%252F%2520%2540output_file_name%2520default.js%250A%252F%252F%2520%253D%253D%252FClosureCompiler%253D%253D%250A%250A%252F%252F%2520ADD%2520YOUR%2520CODE%2520HERE%250Aclass%2520Super%2520%257B%250A%2520%2520%252F**%2520%2520%250A%2520%2520%2520%2520%2520*%2520%2540nocollapse%2520%250A%2520%2520%2520%2520%2520*%252F%250A%2520%2520static%2520method()%2520%257B%250A%2520%2520%2520%2520return%2520'foo'%253B%250A%2520%2520%257D%250A%257D%250A%250Aclass%2520Sub%2520extends%2520Super%2520%257B%257D%250A%250Aconsole.log(Sub.method())%253B%2520%252F%252F%2520should%2520log%2520'foo'%250Aconsole.log(Sub.hasOwnProperty('method'))%253B%2520%252F%252F%2520should%2520log%2520'false'%2520because%2520Sub.method%2520is%2520inherited

The actual code uses $jscomp.inherits instead of Object.setPrototypeOf. `$jscomp.inherits` looks like: ```javascript $jscomp.inherits = function(a, b) { a.prototype = $jscomp.objectCreate(b.prototype); a.prototype.constructor = a; if ($jscomp.setPrototypeOf) { var c = $jscomp.setPrototypeOf;...

We're miscommunicating. I agree that the implementation of `$jscomp.inherits` is good, and the best known option for modelling inheritance. The issue is that the output also sets inherited class methods...

A minimal repro of the issue we're seeing now: ```ts class Foo { /** * Using export to avoid needing reflect.objectProperty below. * @export * @nocollapse */ static foo: string...

Hm, my intuition is that if we documented everything that iron-ajax did, the documentation would be as long as the spec itself! OTOH this is a fairly reasonable thing to...