Fix iterating over non-filtered array
This commit is contained in:
parent
1289913d06
commit
0da43b0411
@ -18,7 +18,7 @@ export class Name {
|
||||
}
|
||||
|
||||
export interface IYear {
|
||||
yeak: number
|
||||
year: number
|
||||
}
|
||||
|
||||
export interface ITyped<T> {
|
||||
@ -26,8 +26,9 @@ export interface ITyped<T> {
|
||||
}
|
||||
|
||||
type AorB = 'A' | 'B'
|
||||
interface IB { a: number }
|
||||
/* tslint:disable-next-line */
|
||||
type Param<T> = {t: T}
|
||||
type Param<T> = {t: T, b: IB}
|
||||
|
||||
export class Person {
|
||||
readonly name!: Name
|
||||
|
||||
@ -205,6 +205,11 @@ export function typecheck(...argv: string[]) {
|
||||
if (typeDefinitions.has(type)) {
|
||||
return
|
||||
}
|
||||
// if (type.aliasSymbol) {
|
||||
// TODO figure out how to prevent iterating of properties from types
|
||||
// such as strings
|
||||
// return
|
||||
// }
|
||||
const typeParameters: ts.TypeParameter[] = []
|
||||
const expandedTypeParameters: ts.Type[] = []
|
||||
const allRelevantTypes: ts.Type[] = []
|
||||
@ -278,19 +283,19 @@ export function typecheck(...argv: string[]) {
|
||||
console.log(`interface ${classDef.name} {`)
|
||||
console.log(' ',
|
||||
classDef.properties
|
||||
.map(p => p.name + ': ' + typeToString(p.type)) // + ' {' +
|
||||
// p.relevantTypes.map(typeToString) + '}')
|
||||
.map(p => p.name + ': ' + typeToString(p.type) + ' {' +
|
||||
p.relevantTypes.map(typeToString) + '}')
|
||||
.join('\n '),
|
||||
)
|
||||
console.log('}')
|
||||
// console.log('\n allRelevantTypes:\n ',
|
||||
// classDef.allRelevantTypes.map(typeToString).join('\n '))
|
||||
console.log('\n allRelevantTypes:\n ',
|
||||
classDef.allRelevantTypes.map(typeToString).join('\n '))
|
||||
console.log('\n')
|
||||
|
||||
classDefs.push(classDef)
|
||||
typeDefinitions.set(type, classDef)
|
||||
|
||||
allRelevantTypes.map(handleType)
|
||||
classDef.allRelevantTypes.forEach(handleType)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user