refactor: early compatibility with TypeScript 3.5 (#31174)
This commit fixes a couple of issues with TS 3.5 compatibility in order to unblock migration of g3. Mostly 'any's are added, and there are no behavior changes. PR Close #31174
This commit is contained in:

committed by
Kara Erickson

parent
34eaafdf40
commit
fad03c3c14
@ -907,7 +907,7 @@ export class CompileMetadataResolver {
|
||||
let isOptional = false;
|
||||
let token: any = null;
|
||||
if (Array.isArray(param)) {
|
||||
param.forEach((paramEntry) => {
|
||||
param.forEach((paramEntry: any) => {
|
||||
if (createHost.isTypeOf(paramEntry)) {
|
||||
isHost = true;
|
||||
} else if (createSelf.isTypeOf(paramEntry)) {
|
||||
@ -918,11 +918,12 @@ export class CompileMetadataResolver {
|
||||
isOptional = true;
|
||||
} else if (createAttribute.isTypeOf(paramEntry)) {
|
||||
isAttribute = true;
|
||||
token = paramEntry.attributeName;
|
||||
token = (paramEntry as any).attributeName;
|
||||
} else if (createInject.isTypeOf(paramEntry)) {
|
||||
token = paramEntry.token;
|
||||
token = (paramEntry as any).token;
|
||||
} else if (
|
||||
createInjectionToken.isTypeOf(paramEntry) || paramEntry instanceof StaticSymbol) {
|
||||
createInjectionToken.isTypeOf(paramEntry) ||
|
||||
(paramEntry as any) instanceof StaticSymbol) {
|
||||
token = paramEntry;
|
||||
} else if (isValidType(paramEntry) && token == null) {
|
||||
token = paramEntry;
|
||||
|
Reference in New Issue
Block a user