From f44e6193af1d0972302a46b740e55d506e1afed5 Mon Sep 17 00:00:00 2001 From: Alex Rattray Date: Tue, 22 Jun 2021 13:45:49 -0400 Subject: [PATCH] Allow multiline sql I have not tested this (just made the intuitive change in github) but curious if it works / you are interested. This is intended as a proof-of-concept for https://github.com/adelsz/pgtyped/issues/233 --- src/Utils/StringUtils.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Utils/StringUtils.ts b/src/Utils/StringUtils.ts index 8c55e2a..847e194 100644 --- a/src/Utils/StringUtils.ts +++ b/src/Utils/StringUtils.ts @@ -24,7 +24,10 @@ export type MatchString = MatchString, Pattern> extends true ? true : false; -export type Trim = T extends ` ${infer Rest}` ? Trim : T; +export type Trim = + T extends ` ${infer Rest}` ? Trim : + T extends `\n${infer Rest}` ? Trim : + T; type Indents = {