Skip to content

Added support for static private fields accessors and methods. #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
5ebb3d6
Added support for static private fields accessors and methods.
dragomirtitian Feb 16, 2021
7006c09
Added error message for private identifiers used with static decorato…
dragomirtitian Feb 16, 2021
b876613
Fixed emit static bug that used private names outside of classes for …
dragomirtitian Feb 18, 2021
31a8c00
Added tests for private static fields methods and accessors.
dragomirtitian Feb 18, 2021
5a27a32
Merge remote-tracking branch 'remotes/bloomberg/es-private-methods-an…
dragomirtitian Feb 19, 2021
d2ab6fc
Merge branch 'es-private-methods-and-accessors' into es-private-stati…
dragomirtitian Feb 19, 2021
23f6c67
Accept new baseline.
dragomirtitian Feb 19, 2021
374e6f3
Improved duplicate identifier checks for static private class elements.
dragomirtitian Feb 19, 2021
62b4f2f
Added error when using initializers with private static fields when u…
dragomirtitian Feb 23, 2021
b2a692d
Fixed code review issues.
dragomirtitian Feb 24, 2021
363041e
Removed semantically wrong emit on `useDefineForClassFields:true` wit…
dragomirtitian Feb 24, 2021
64757e0
Changed emit for uninitialized private static fields.
dragomirtitian Feb 25, 2021
68a7f80
Added runtime error in helper if a static private field is accessed b…
dragomirtitian Feb 25, 2021
7e7b0b1
Fixed code review comments for private identifier static class elements.
dragomirtitian Feb 25, 2021
2834737
typo (#42899)
pushkine Mar 2, 2021
82de139
Fixed typo error. (#42816)
Suryadevelops Mar 2, 2021
0b337f1
Update project.ts (#42900)
pushkine Mar 2, 2021
3d1c6e8
fix(42765): require should not work in ts files (#42792)
Zzzen Mar 2, 2021
c497b48
Add undefined to Symbol.valueDeclaration (#43033)
sandersn Mar 2, 2021
f1c911b
fix(43006): skip trivia in a function name (#43021)
a-tarasyuk Mar 3, 2021
5dbb110
Baseline completions and signature help (#43049)
sandersn Mar 3, 2021
0cf834c
Move fixed chunk size polling as a watch option and move it out of se…
sheetalkamat Mar 3, 2021
6cd87d0
Delete old, different-case name of quickInfoJSDocTags.baseline (#43052)
sandersn Mar 3, 2021
652199a
Added tests
armanio123 Mar 3, 2021
a8742e3
Update package-lock.json
typescript-bot Mar 3, 2021
09a5aae
Merge branch 'es-private-methods-and-accessors' into es-private-stati…
dragomirtitian Mar 3, 2021
497e47f
Fixed code review issues for private class elements.
dragomirtitian Mar 3, 2021
7751ecb
fix receiver on calls of imported and exported functions (#35877)
ajafff Mar 3, 2021
8a81a67
Merge pull request #43055 from armanio123/FixDefineForClassFields
armanio123 Mar 3, 2021
15e69ac
capture thisArg of optionalChaining in parens (#35494)
ajafff Mar 4, 2021
3e05aa6
Update package-lock.json
typescript-bot Mar 4, 2021
1f6a8d7
Do a shallow clone for Docker tests. (#42966)
DanielRosenwasser Mar 4, 2021
e234f0c
Update the DOM: March 03, 2021 (#43070)
sandersn Mar 4, 2021
38fdce9
Expose 'reservedInNestedScopes' option when creating temp and loop va…
rbuckton Mar 4, 2021
ca8d9e4
fix(39836): allow type declaration/unknown type in catch arguments in…
a-tarasyuk Mar 5, 2021
9862b03
Relax requirements on index signatures to 'any' when a type also cont…
DanielRosenwasser Mar 5, 2021
f0a72e2
Update package-lock.json
typescript-bot Mar 5, 2021
408c804
Properly instantiate inferred constraints in conditional types (#42747)
ahejlsberg Mar 5, 2021
25375a2
Unnecessary elaboration about not being assignable to type parameters…
jonhue Mar 5, 2021
612a96e
Update parseInt parameter name and jsdoc (#42756)
sangxxh Mar 5, 2021
7394efc
Update package-lock.json
typescript-bot Mar 6, 2021
ba56fca
Remove undefined from optional properties when inferring to index sig…
ahejlsberg Mar 6, 2021
f918bd9
Exclude enum/number compatibility rule from comparable relation (#42472)
ahejlsberg Mar 6, 2021
f7cd702
Update package-lock.json
typescript-bot Mar 7, 2021
4d50624
Update package-lock.json
typescript-bot Mar 8, 2021
294cc48
Fixes class shadowing when checking access to a private static class …
dragomirtitian Mar 8, 2021
027bdb3
Merge remote-tracking branch 'remotes/origin/master' into es-private-…
dragomirtitian Mar 8, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ You can also use the [provided VS Code launch configuration](./.vscode/launch.te

## Adding a Test

To add a new test case, add a `.ts` file in `tests\cases\compiler` with code that shows the your bug is now fixed, or your new feature now works.
To add a new test case, add a `.ts` file in `tests\cases\compiler` with code that shows the bug is now fixed, or your new feature now works.

These files support metadata tags in the format `// @metaDataName: value`.
The supported names and values are the same as those supported in the compiler itself, with the addition of the `fileName` flag.
Expand Down
74 changes: 37 additions & 37 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/compiler/binder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3187,7 +3187,7 @@ namespace ts {
undefined;
init = init && getRightMostAssignedExpression(init);
if (init) {
const isPrototypeAssignment = isPrototypeAccess(isVariableDeclaration(node) ? node.name : isBinaryExpression(node) ? node.left : node);
const isPrototypeAssignment = isPrototypeAccess(isVariableDeclaration(node!) ? node.name : isBinaryExpression(node!) ? node.left : node!);
return !!getExpandoInitializer(isBinaryExpression(init) && (init.operatorToken.kind === SyntaxKind.BarBarToken || init.operatorToken.kind === SyntaxKind.QuestionQuestionToken) ? init.right : init, isPrototypeAssignment);
}
return false;
Expand Down
Loading