@@ -32,7 +32,7 @@ export type JoinRelationship = 'hasOne' | 'hasMany' | 'belongsTo';
3232type ColumnsToJoin = {
3333 cubeToJoin : string ;
3434 columnToJoin : string ;
35- tableName : string ;
35+ tableName : TableName ;
3636} ;
3737
3838export type CubeDescriptorMember = {
@@ -112,7 +112,7 @@ export type DatabaseSchema = Record<string, { [key: string]: ColumnData[] }>;
112112type TableData = {
113113 schema : string ,
114114 table : string ,
115- tableName : string ;
115+ tableName : TableName ;
116116 tableDefinition : ColumnData [ ] ,
117117} ;
118118
@@ -122,7 +122,7 @@ type ScaffoldingSchemaOptions = {
122122} ;
123123
124124export class ScaffoldingSchema {
125- private tableNamesToTables : { [ key : string ] : TableData [ ] } = { } ;
125+ private tableNamesToTables : Record < string , TableData [ ] > = { } ;
126126
127127 public constructor (
128128 private readonly dbSchema : DatabaseSchema ,
@@ -198,7 +198,7 @@ export class ScaffoldingSchema {
198198 tableNames . map ( tableName => {
199199 const [ schema , table ] = this . parseTableName ( tableName ) ;
200200 const tableDefinition = this . resolveTableDefinition ( tableName ) ;
201- const definition = {
201+ const definition : TableData = {
202202 schema, table, tableDefinition, tableName
203203 } ;
204204 const tableizeName = inflection . tableize ( this . fixCase ( table ) ) ;
@@ -237,7 +237,7 @@ export class ScaffoldingSchema {
237237 } ;
238238 }
239239
240- protected parseTableName ( tableName : TableName ) {
240+ protected parseTableName ( tableName : TableName ) : [ string , string ] {
241241 let schemaAndTable ;
242242 if ( Array . isArray ( tableName ) ) {
243243 schemaAndTable = tableName ;
0 commit comments