diff options
author | Andy Rickert <andrew_rickert@brown.edu> | 2020-05-12 17:37:54 -0700 |
---|---|---|
committer | Andy Rickert <andrew_rickert@brown.edu> | 2020-05-12 17:37:54 -0700 |
commit | 9ad062907d38a7a853ba89fa31433380ae3cd7b3 (patch) | |
tree | 707855e1bc6fa8ac3d1f51447815a51eb83b8aa3 /src/new_fields/Types.ts | |
parent | 1848c78f889470d6c558f709efe1b521402b2793 (diff) | |
parent | 4bd011dcc6a3f009fa10932c7c6ca1932b784fde (diff) |
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; |