diff --git a/types/index.d.ts b/types/index.d.ts index 5dff35a3..ca87f6ce 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -494,12 +494,6 @@ declare namespace postgres { type MaybeRow = Row | undefined; - type TransformRow = T extends Serializable - ? { '?column?': T; } - : T; - - type AsRowList = { [k in keyof T]: TransformRow }; - interface Column { name: T; type: number; @@ -596,7 +590,7 @@ declare namespace postgres { * @param parameters Interpoled values of the template string * @returns A promise resolving to the result of your query */ - (template: TemplateStringsArray, ...parameters: readonly (SerializableParameter | PendingQuery)[]): PendingQuery>; + (template: TemplateStringsArray, ...parameters: readonly (SerializableParameter | PendingQuery)[]): PendingQuery; CLOSE: {}; END: this['CLOSE']; @@ -609,7 +603,7 @@ declare namespace postgres { [name in keyof TTypes]: (value: TTypes[name]) => postgres.Parameter }; - unsafe)[]>(query: string, parameters?: SerializableParameter[], queryOptions?: UnsafeQueryOptions): PendingQuery>; + unsafe)[]>(query: string, parameters?: SerializableParameter[], queryOptions?: UnsafeQueryOptions): PendingQuery; end(options?: { timeout?: number }): Promise; listen(channel: string, onnotify: (value: string) => void, onlisten?: () => void): ListenRequest; @@ -623,8 +617,8 @@ declare namespace postgres { begin(options: string, cb: (sql: TransactionSql) => T | Promise): Promise>; array[] = SerializableParameter[]>(value: T, type?: number): ArrayParameter; - file(path: string | Buffer | URL | number, options?: { cache?: boolean }): PendingQuery>; - file(path: string | Buffer | URL | number, args: SerializableParameter[], options?: { cache?: boolean }): PendingQuery>; + file(path: string | Buffer | URL | number, options?: { cache?: boolean }): PendingQuery; + file(path: string | Buffer | URL | number, args: SerializableParameter[], options?: { cache?: boolean }): PendingQuery; json(value: JSONValue): Parameter; }