kysely 0.3.8 → 0.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -40,7 +40,7 @@ export declare type RowType<DB, TB extends keyof DB> = UnionToIntersection<DB[TB
40
40
  */
41
41
  export declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
42
42
  /**
43
- * Given a database type and a union of table name in that db returns
43
+ * Given a database type and a union of table names in that db, returns
44
44
  * a union type with all possible column names.
45
45
  *
46
46
  * Example:
@@ -74,7 +74,7 @@ export declare type AnyColumn<DB, TB extends keyof DB> = {
74
74
  [T in TB]: keyof DB[T];
75
75
  }[TB];
76
76
  /**
77
- * Given a database type and a union of table names in that db returns
77
+ * Given a database type and a union of table names in that db, returns
78
78
  * a union type with all possible `table`.`column` combinations.
79
79
  *
80
80
  * Example:
@@ -107,21 +107,30 @@ export declare type AnyColumn<DB, TB extends keyof DB> = {
107
107
  export declare type AnyColumnWithTable<DB, TB extends keyof DB> = {
108
108
  [T in TB]: T extends string ? keyof DB[T] extends string ? `${T}.${keyof DB[T]}` : never : never;
109
109
  }[TB];
110
+ /**
111
+ * Just like {@link AnyColumn} but with a ` as <string>` suffix.
112
+ */
110
113
  export declare type AnyAliasedColumn<DB, TB extends keyof DB> = {
111
114
  [T in TB]: T extends string ? keyof DB[T] extends string ? `${keyof DB[T]} as ${string}` : never : never;
112
115
  }[TB];
113
- export declare type AnyAliasedColumnWithTable<DB, TB extends keyof DB> = `${AnyColumnWithTable<DB, TB>} as ${string}`;
114
116
  /**
115
- * Extracts an array item type.
117
+ * Just like {@link AnyColumnWithTable} but with a ` as <string>` suffix.
118
+ */
119
+ export declare type AnyAliasedColumnWithTable<DB, TB extends keyof DB> = {
120
+ [T in TB]: T extends string ? keyof DB[T] extends string ? `${T}.${keyof DB[T]} as ${string}` : never : never;
121
+ }[TB];
122
+ /**
123
+ * Extracts the item type of an array.
116
124
  */
117
125
  export declare type ArrayItemType<T> = T extends ReadonlyArray<infer I> ? I : never;
118
126
  export declare type AnyQueryBuilder = QueryBuilder<any, any, any>;
119
127
  export declare type AnyAliasedQueryBuilder = AliasedQueryBuilder<any, any, any, any>;
120
128
  export declare type AnyRawBuilder = RawBuilder<any>;
129
+ export declare type AnyAliasedRawBuilder = AliasedRawBuilder<any, any>;
121
130
  export declare type QueryBuilderFactory<DB, TB extends keyof DB> = (qb: SubQueryBuilder<DB, TB>) => QueryBuilder<any, any, any>;
122
131
  export declare type AliasedQueryBuilderFactory<DB, TB extends keyof DB> = (qb: SubQueryBuilder<DB, TB>) => AnyAliasedQueryBuilder;
123
132
  export declare type RawBuilderFactory<DB, TB extends keyof DB> = (qb: SubQueryBuilder<DB, TB>) => AnyRawBuilder;
124
- export declare type AliasedRawBuilderFactory<DB, TB extends keyof DB> = (qb: SubQueryBuilder<DB, TB>) => AliasedRawBuilder<any, any>;
133
+ export declare type AliasedRawBuilderFactory<DB, TB extends keyof DB> = (qb: SubQueryBuilder<DB, TB>) => AnyAliasedRawBuilder;
125
134
  export interface InsertResultTypeTag {
126
135
  /** @internal */
127
136
  __isInsertResultTypeTag__: true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kysely",
3
- "version": "0.3.8",
3
+ "version": "0.3.9",
4
4
  "description": "Type safe SQL query builder",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,7 +24,7 @@
24
24
  "build": "npm run clean && npm run build:esm && npm run build:cjs && ./module-fixup.sh",
25
25
  "build:esm": "tsc -p tsconfig.json",
26
26
  "build:cjs": "tsc -p tsconfig-cjs.json",
27
- "docs:build": "typedoc --excludePrivate --excludeInternal src/index.ts && npm run docs:postprocess",
27
+ "docs:build": "typedoc --excludePrivate --excludeInternal --customCss ./docs-theme.css src/index.ts && npm run docs:postprocess",
28
28
  "docs:postprocess": "node post-process-docs.js",
29
29
  "prepublish": "npm run build"
30
30
  },