diff options
Diffstat (limited to 'std/_util/assert.ts')
-rw-r--r-- | std/_util/assert.ts | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/std/_util/assert.ts b/std/_util/assert.ts deleted file mode 100644 index 2588190de..000000000 --- a/std/_util/assert.ts +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. - -export class DenoStdInternalError extends Error { - constructor(message: string) { - super(message); - this.name = "DenoStdInternalError"; - } -} - -/** Make an assertion, if not `true`, then throw. */ -export function assert(expr: unknown, msg = ""): asserts expr { - if (!expr) { - throw new DenoStdInternalError(msg); - } -} |