diff options
author | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-05-04 12:22:04 +0530 |
---|---|---|
committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-05-04 12:22:04 +0530 |
commit | 95ec58135f3534640afc0a38d8c4bbbb84bc3434 (patch) | |
tree | 2b04fb11d2f821155668c4ebcec3a86229a01acb /src/new_fields/Types.ts | |
parent | a2eb8ba283ce4a8fb7f423a9198e2a5778eba886 (diff) | |
parent | 1027f0b2e40df0ca13dfa2db97f278e804dadb68 (diff) |
finishing merge
Diffstat (limited to 'src/new_fields/Types.ts')
-rw-r--r-- | src/new_fields/Types.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/new_fields/Types.ts b/src/new_fields/Types.ts index aa44cefa0..3d784448d 100644 --- a/src/new_fields/Types.ts +++ b/src/new_fields/Types.ts @@ -88,8 +88,8 @@ export function DateCast(field: FieldResult) { return Cast(field, DateField, null); } -export function ScriptCast(field: FieldResult) { - return Cast(field, ScriptField, null); +export function ScriptCast(field: FieldResult, defaultVal: ScriptField | null = null) { + return Cast(field, ScriptField, defaultVal); } type WithoutList<T extends Field> = T extends List<infer R> ? (R extends RefField ? (R | Promise<R>)[] : R[]) : T; |