Skip to content

Commit 7ba59e1

Browse files
committed
fixup! fix(ivy): handle class declarations consistently in ES5 code
1 parent 02c2fa4 commit 7ba59e1

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

packages/compiler-cli/ngcc/src/host/esm2015_host.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -446,10 +446,7 @@ export class Esm2015ReflectionHost extends TypeScriptReflectionHost implements N
446446
/**
447447
* Examine a symbol which should be of a class, and return metadata about its members.
448448
*
449-
* @param symbol the `ClassSymbol` representing the class over which to reflect. If the source is
450-
* in
451-
* ES2015 format, this will be a `ts.ClassDeclaration` node. If the source is in ES5 format, this
452-
* might be a `ts.FunctionDeclaration` as classes in ES5 are downleveled to constructor functions.
449+
* @param symbol the `ClassSymbol` representing the class over which to reflect.
453450
* @returns an array of `ClassMember` metadata representing the members of the class.
454451
*/
455452
protected getMembersOfSymbol(symbol: ClassSymbol): ClassMember[] {

packages/compiler-cli/ngcc/src/host/esm5_host.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ export class Esm5ReflectionHost extends Esm2015ReflectionHost {
6868
* So we might need to dig around to get hold of the "class" declaration.
6969
*
7070
* `node` might be one of:
71-
* - A class declaration (from a declaration file).
71+
* - A class declaration (from a typings file).
7272
* - The declaration of the outer variable, which is assigned the result of the IIFE.
7373
* - The function declaration inside the IIFE, which is eventually returned and assigned to the
7474
* outer variable.
7575
*
76-
* The returned declaration is either the class declaration (from the declaration file) or the
77-
* outer variable declaration.
76+
* The returned declaration is either the class declaration (from the typings file) or the outer
77+
* variable declaration.
7878
*
7979
* @param node the node that represents the class whose declaration we are finding.
8080
* @returns the declaration of the class or `undefined` if it is not a "class".

0 commit comments

Comments
 (0)