TypeScript/tests/cases/conformance
Nathan Shively-Sanders 3c5ecc2a60
Add jsdoc support for @public/@private/@protected (#35731)
* Add @private/@protected/@public test

* Fix @declaration

* draft abstraction + one usage

* Fill in necessary parsing etc

* make general getEffectiveModifierFlags

move to utilities, make the right things call it

* reorder public/private/protected

* JS declaration emit works with @public/@private/@protected

* revert unneeded/incorrect changes

* Update baselines and skip @public/etc when parsing

1. Update the API baselines with the new functions.
2. Do not check for @public/etc during parsing, because parent pointers
aren't set, so non-local tags will be missed; this wrong answer will
then be cached.

* Parser: don't call hasModifier(s) anymore.

Then move jsdoc modifier tag checks into getModifierFlagsNoCache where
they should be. The jsdoc checks are skipped when the parent is
undefined. There are 3 cases when this can happen:

1. The code is in the parser (or a few places in the binder, notably
declareSymbol of module.exports assignments).
2. The node is a source file.
3. The node is synthetic, which I assume to be from the transforms.

It is fine to call getModifierFlags in cases (2) and (3). It is not fine
for (1), so I removed these calls and replaced them with simple
iteration over the modifiers. Worth noting: Ron's uniform node construction
PR removes these calls anyway; this PR just does it early.

* Fix constructor emit

1. Emit protected for protected, which I missed earlier.
2. Emit a constructor, not a property named "constructor".
3. Split declaration emit tests out so that errors are properly reported
there.
2019-12-18 12:58:12 -08:00
..
ambient Add bad test case 2019-04-24 08:44:24 -07:00
async Prevent substitution of 'super' in async super helper 2019-03-19 11:35:18 -07:00
classes Emit defineProperty calls before param prop assignments (#34987) 2019-11-22 15:37:24 -08:00
constEnums fix compiler crash (#25925) 2019-04-25 10:51:36 -07:00
controlFlow Properly analyze switch statement bypass control flow (#35087) 2019-11-13 09:22:18 -08:00
declarationEmit Merge branch 'master' into attach_property_to_default_export 2019-03-22 17:40:37 +08:00
decorators Change the type of 'uriComponent' (passed to 'encodeURIComponent') from 'string' to 'string | number | boolean'. Fixes #18159 (#31103) 2019-04-26 13:07:14 -07:00
dynamicImport Unpatch vfs resolver and default lib rename 2018-05-03 14:18:50 -07:00
emitter Merge branch 'master' into es2019 2019-02-07 10:08:26 +09:00
enums disallow 'await' and 'yield' in property and enum member initializer (#34892) 2019-11-14 17:44:48 -08:00
es6 Improve type checking and inference for Generators and Async Generators (#30790) 2019-07-03 21:55:59 -07:00
es7 Allow trailing commas after-rest elements in destructuring 2018-06-04 14:58:30 -07:00
es2017 Fix #21089: Do not infer from numeric index signature in Object.values and Object.entries (#21129) 2018-01-17 14:16:11 -08:00
es2018 Change esnext.promise to es2018.promise (#22292) 2018-03-02 17:08:36 -08:00
es2019 Fix crash when exporting+aliasing globalThis inside declare global (#34408) 2019-10-15 14:05:39 -07:00
expressions More tests for super.method call chain, improve vary-by (#35013) 2019-11-18 18:03:37 -08:00
externalModules Add test 2019-04-08 09:46:47 -07:00
functions Add tests 2018-12-10 09:45:55 -08:00
generators Get contextual type of yield from contextual signature of containing function (#32433) 2019-07-16 17:16:21 -07:00
interfaces getConstraintDeclaration gets the first declaration with a constraint… (#33426) 2019-09-18 13:56:24 -07:00
internalModules
jsdoc Add jsdoc support for @public/@private/@protected (#35731) 2019-12-18 12:58:12 -08:00
jsx Fix decoding of HTML entities in TSX/JSX (#35739) 2019-12-17 17:32:48 -08:00
moduleResolution Fix handling of empty 'types', 'typings', etc. fields in package.json (#31539) 2019-05-23 17:19:32 -07:00
parser Add test for parenthesized variable and function keyword within ternary 2019-04-01 14:11:30 -07:00
references Update Harness.compileFiles to use vfs 2017-11-09 16:01:33 -08:00
salsa Fix binding of this-assignments w/computed properties (#35639) 2019-12-11 15:55:08 -08:00
scanner Add error message for keywords with escapes in them (#32718) 2019-08-12 16:00:38 -07:00
statements Reset error record in downlevel for-of (#31519) 2019-05-22 11:18:07 -07:00
Symbols
types Fix33448 (#35513) 2019-12-12 06:45:46 -08:00
typings Only suggest adding to types if present in compilerOptions 2018-10-30 21:31:22 +01:00
fixSignatureCaching.ts Property assignments in Typescript (#26368) 2018-08-15 15:25:25 -07:00
inferFromBindingPattern.ts Make no inferences from binding patterns with no defaults (#35454) 2019-12-05 07:09:45 -08:00