Skip to content

Commit

Permalink
Fix bugs in integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpf committed Feb 19, 2018
1 parent 0286fc9 commit 47ae028
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
14 changes: 12 additions & 2 deletions test/expected/mysql/osm.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
/* tslint:disable */

type HasTypeKey<T> = {
[K in keyof T]: {
type: any
}
}

type SimpleSchema<T extends HasTypeKey<T>> = {
[K in keyof T]: T[K]['type']
}

export type enum_enum_col = 'enum1' | 'enum2' | 'enum3';
export type enum_nullable_enum_col = 'enum1' | 'enum2' | 'enum3';
export type set_set_col = 'set1' | 'set2' | 'set3';
Expand Down Expand Up @@ -137,7 +147,7 @@ export namespace user_enumsFields {
export type enum_col = { type: enum_enum_col, };
export type nullable_enum_col = { type: enum_nullable_enum_col | null, };
export type set_col = { type: set_set_col, };
export type nullable_set_col = set_nullable_set_col { type: | null, };
export type nullable_set_col = { type: set_nullable_set_col | null, };

}

Expand All @@ -149,7 +159,7 @@ interface user_enumsMeta {

}

export type users = SimpleSchema<usersMeta>
export type user_enums = SimpleSchema<user_enumsMeta>

export namespace packageFields {
export type number_ = { type: number, };
Expand Down
12 changes: 11 additions & 1 deletion test/expected/postgres/osm-camelcase.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
/* tslint:disable */

type HasTypeKey<T> = {
[K in keyof T]: {
type: any
}
}

type SimpleSchema<T extends HasTypeKey<T>> = {
[K in keyof T]: T[K]['type']
}

export type FormatEnum = 'html' | 'markdown' | 'text';
export type UserStatusEnum = 'active' | 'confirmed' | 'deleted' | 'pending' | 'suspended';

export namespace UsersFields {
export type email = { type: string, primaryKey: false, unique: false, };
export type id = { type: number, primaryKey: false, unique: false, };
export type passCrypt = { type: string, primaryKey: false, unique: false, };
export type creationTime = Date{ type: ;, primaryKey: false, unique: false, }
export type creationTime = { type: Date, primaryKey: false, unique: false, };
export type displayName = { type: string, primaryKey: false, unique: false, };
export type dataPublic = { type: boolean, primaryKey: false, unique: false, };
export type description = { type: string, primaryKey: false, unique: false, };
Expand Down

0 comments on commit 47ae028

Please sign in to comment.