Add shims for x-* (not used, convenience) (#1282)

* Add shims for x-* (not used, convenience)

* Update packages/x-ws/src/shim.ts

* Remove (now) unused dependencies
This commit is contained in:
Jaco
2021-12-05 10:09:47 +02:00
committed by GitHub
parent 699ef952c3
commit 7436976598
9 changed files with 43 additions and 11 deletions
+9
View File
@@ -0,0 +1,9 @@
// Copyright 2017-2021 @polkadot/x-textdecoder authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { xglobal } from '@polkadot/x-global';
import { TextDecoder } from '@polkadot/x-textdecoder';
if (typeof xglobal.TextDecoder !== 'function') {
(xglobal as Record<string, unknown>).TextDecoder = TextDecoder;
}