aboutsummaryrefslogtreecommitdiff
path: root/src/fields/Types.ts
diff options
context:
space:
mode:
authorNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-06-03 13:33:37 -0400
committerNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-06-03 13:33:37 -0400
commit9e77f980e7704999ef0a1c1845d660bccb13ff8a (patch)
tree14ca0da5915e4382a7bcb15f7d0b241941c8291f /src/fields/Types.ts
parent1be63695875c9242fba43d580465e8765cf3991d (diff)
parent202e994515392892676f8f080852db1e32b8dbd3 (diff)
Merge branch 'master' into nathan-starter
Diffstat (limited to 'src/fields/Types.ts')
-rw-r--r--src/fields/Types.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fields/Types.ts b/src/fields/Types.ts
index 26196d15d..ef79f72e4 100644
--- a/src/fields/Types.ts
+++ b/src/fields/Types.ts
@@ -5,7 +5,7 @@ import { ProxyField } from './Proxy';
import { RefField } from './RefField';
import { RichTextField } from './RichTextField';
import { ScriptField } from './ScriptField';
-import { CsvField, ImageField, WebField } from './URLField';
+import { CsvField, ImageField, PdfField, WebField } from './URLField';
// eslint-disable-next-line no-use-before-define
export type ToConstructor<T extends FieldType> = T extends string ? 'string' : T extends number ? 'number' : T extends boolean ? 'boolean' : T extends List<infer U> ? ListSpec<U> : new (...args: any[]) => T;
@@ -122,6 +122,9 @@ export function CsvCast(field: FieldResult, defaultVal: CsvField | null = null)
export function WebCast(field: FieldResult, defaultVal: WebField | null = null) {
return Cast(field, WebField, defaultVal);
}
+export function PDFCast(field: FieldResult, defaultVal: PdfField | null = null) {
+ return Cast(field, PdfField, defaultVal);
+}
export function ImageCast(field: FieldResult, defaultVal: ImageField | null = null) {
return Cast(field, ImageField, defaultVal);
}