TypeScript/tests/cases/compiler/decoratorMetadataNoStrictNull.ts
Wesley Wigham de0e475c64 Recreate old decorator metadata behavior (#19089)
* Emulate pre 2.4 metadata behavior of eliding null and undefined from unions without strictNullChecks

* Accept baseline

* Update comment

* Update for second old baseline

* Respect strict
2017-10-12 15:05:04 -07:00

8 lines
196 B
TypeScript

// @experimentalDecorators: true
// @emitDecoratorMetadata: true
const dec = (obj: {}, prop: string) => undefined
class Foo {
@dec public foo: string | null;
@dec public bar: string;
}