diff options
author | Maximilien Mellen <maxmellen0@gmail.com> | 2020-02-19 21:36:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-19 15:36:18 -0500 |
commit | 90125566bbaed8b5c6e55ca8dbc432e3433fb73c (patch) | |
tree | bf798a408b26264641260395ce8cfc9d4bb37637 /std/util/deep_assign.ts | |
parent | 852823fa505d75d61e70e1330bbf366aa248e650 (diff) |
Enable TS strict mode by default (#3899)
Fixes #3324
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
Diffstat (limited to 'std/util/deep_assign.ts')
-rw-r--r-- | std/util/deep_assign.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/std/util/deep_assign.ts b/std/util/deep_assign.ts index 9b57e45dc..9034d89bd 100644 --- a/std/util/deep_assign.ts +++ b/std/util/deep_assign.ts @@ -1,4 +1,6 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. +import { assert } from "../testing/asserts.ts"; + export function deepAssign( target: Record<string, unknown>, ...sources: object[] @@ -24,6 +26,7 @@ export function deepAssign( if (typeof target[key] !== `object` || !target[key]) { target[key] = {}; } + assert(value); deepAssign(target[key] as Record<string, unknown>, value); }); } |