Skip to content

Commit 8326037

Browse files
committed
Make linter happy
1 parent 380fbd2 commit 8326037

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

compiler/src/model/build-model.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ function compileClassOrInterfaceDeclaration (declaration: ClassDeclaration | Int
444444
for (const typeParameter of declaration.getTypeParameters()) {
445445
type.generics = (type.generics ?? []).concat({
446446
name: modelGenerics(typeParameter),
447-
namespace: type.name.namespace + '.' + type.name.name
447+
namespace: type.name.namespace + '.' + type.name.name
448448
})
449449
}
450450

@@ -532,7 +532,7 @@ function compileClassOrInterfaceDeclaration (declaration: ClassDeclaration | Int
532532
for (const typeParameter of declaration.getTypeParameters()) {
533533
type.generics = (type.generics ?? []).concat({
534534
name: modelGenerics(typeParameter),
535-
namespace: type.name.namespace + '.' + type.name.name
535+
namespace: type.name.namespace + '.' + type.name.name
536536
})
537537
}
538538

compiler/src/model/utils.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -343,20 +343,20 @@ export function modelType (node: Node): model.ValueOf {
343343
namespace: getNameSpace(node)
344344
}
345345
}
346-
346+
347347
if (Node.isTypeParameterDeclaration(declaration)) {
348-
const parent = declaration.getParent();
348+
const parent = declaration.getParent()
349349
assert(
350-
parent,
351-
Node.isClassDeclaration(parent) ||
352-
Node.isInterfaceDeclaration(parent) ||
353-
Node.isTypeAliasDeclaration(parent),
354-
'It should be a class, interface, enum, type alias, or type parameter declaration'
350+
parent,
351+
Node.isClassDeclaration(parent) ||
352+
Node.isInterfaceDeclaration(parent) ||
353+
Node.isTypeAliasDeclaration(parent),
354+
'It should be a class, interface, enum, type alias, or type parameter declaration'
355355
)
356-
357-
type.type.namespace += '.' + parent.getName() as string;
356+
357+
type.type.namespace = `${type.type.namespace}.${parent.getName() as string}`
358358
}
359-
359+
360360
return type
361361
}
362362
}
@@ -489,10 +489,9 @@ export function modelEnumDeclaration (declaration: EnumDeclaration): model.Enum
489489
export function modelTypeAlias (declaration: TypeAliasDeclaration): model.TypeAlias {
490490
const type = declaration.getTypeNode()
491491
assert(declaration, type != null, 'Type alias without a referenced type')
492-
493492
const generics = declaration.getTypeParameters().map(typeParameter => ({
494493
name: modelGenerics(typeParameter),
495-
namespace: getNameSpace(typeParameter) + '.' + declaration.getName() as string
494+
namespace: getNameSpace(typeParameter) + '.' + declaration.getName()
496495
}))
497496

498497
const alias = modelType(type)

0 commit comments

Comments
 (0)