diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2021-07-19 11:56:14 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-19 11:56:14 +1000 |
commit | 07eb44e483314528c96d6125a306167dbd308c7e (patch) | |
tree | d319104e81c5e08a438155f13877811e9bd8855d /cli/tests/unit | |
parent | a23c0af5bd1bf56a5fdb051278138258c09ea076 (diff) |
fix(tsc): add .at() types manually to tsc (#11443)
Fixes: #11441
Diffstat (limited to 'cli/tests/unit')
-rw-r--r-- | cli/tests/unit/esnext_test.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cli/tests/unit/esnext_test.ts b/cli/tests/unit/esnext_test.ts new file mode 100644 index 000000000..558c678bc --- /dev/null +++ b/cli/tests/unit/esnext_test.ts @@ -0,0 +1,12 @@ +// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. +import { assertEquals, unitTest } from "./test_util.ts"; + +// TODO(@kitsonk) remove when we are no longer patching TypeScript to have +// these types available. + +unitTest(function typeCheckingEsNextArrayString() { + const a = "abcdef"; + assertEquals(a.at(-1), "f"); + const b = ["a", "b", "c", "d", "e", "f"]; + assertEquals(b.at(-1), "f"); +}); |