From e443237a81bf369ee3695f8658ab75575a8f9001 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Wed, 14 Jul 2021 12:25:23 +1000 Subject: [PATCH] Remove local type definitions for Karma to not return "not found" --- src/lib/waku.spec.ts | 2 ++ src/lib/waku.ts | 6 ++++++ src/lib/waku_light_push/index.spec.ts | 2 ++ src/lib/waku_message/index.spec.ts | 2 ++ src/lib/waku_relay/index.spec.ts | 2 ++ src/lib/waku_store/index.spec.ts | 2 ++ src/types/types.d.ts | 17 ----------------- 7 files changed, 16 insertions(+), 17 deletions(-) delete mode 100644 src/types/types.d.ts diff --git a/src/lib/waku.spec.ts b/src/lib/waku.spec.ts index 83ab8208ba..287b44b380 100644 --- a/src/lib/waku.spec.ts +++ b/src/lib/waku.spec.ts @@ -1,4 +1,6 @@ import { expect } from 'chai'; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: No types available import TCP from 'libp2p-tcp'; import { makeLogFileName, NimWaku, NOISE_KEY_1 } from '../test_utils/'; diff --git a/src/lib/waku.ts b/src/lib/waku.ts index c53ba5797f..737be510b5 100644 --- a/src/lib/waku.ts +++ b/src/lib/waku.ts @@ -1,9 +1,15 @@ import Libp2p, { Connection, Libp2pModules, Libp2pOptions } from 'libp2p'; import { MuxedStream } from 'libp2p-interfaces/dist/src/stream-muxer/types'; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: No types available import Mplex from 'libp2p-mplex'; import { bytes } from 'libp2p-noise/dist/src/@types/basic'; import { Noise } from 'libp2p-noise/dist/src/noise'; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: No types available import Websockets from 'libp2p-websockets'; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: No types available import filters from 'libp2p-websockets/src/filters'; import Ping from 'libp2p/src/ping'; import { Multiaddr, multiaddr } from 'multiaddr'; diff --git a/src/lib/waku_light_push/index.spec.ts b/src/lib/waku_light_push/index.spec.ts index fbab17a763..f653db86a6 100644 --- a/src/lib/waku_light_push/index.spec.ts +++ b/src/lib/waku_light_push/index.spec.ts @@ -1,4 +1,6 @@ import { expect } from 'chai'; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: No types available import TCP from 'libp2p-tcp'; import { makeLogFileName, NimWaku, NOISE_KEY_1 } from '../../test_utils'; diff --git a/src/lib/waku_message/index.spec.ts b/src/lib/waku_message/index.spec.ts index 5c34d61e43..7289de649d 100644 --- a/src/lib/waku_message/index.spec.ts +++ b/src/lib/waku_message/index.spec.ts @@ -1,6 +1,8 @@ import { expect } from 'chai'; import debug from 'debug'; import fc from 'fast-check'; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: No types available import TCP from 'libp2p-tcp'; import { diff --git a/src/lib/waku_relay/index.spec.ts b/src/lib/waku_relay/index.spec.ts index 8fbc217fde..7342221cf6 100644 --- a/src/lib/waku_relay/index.spec.ts +++ b/src/lib/waku_relay/index.spec.ts @@ -1,5 +1,7 @@ import { expect } from 'chai'; import debug from 'debug'; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: No types available import TCP from 'libp2p-tcp'; import { diff --git a/src/lib/waku_store/index.spec.ts b/src/lib/waku_store/index.spec.ts index ff220a9026..d602439ef8 100644 --- a/src/lib/waku_store/index.spec.ts +++ b/src/lib/waku_store/index.spec.ts @@ -1,5 +1,7 @@ import { expect } from 'chai'; import debug from 'debug'; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: No types available import TCP from 'libp2p-tcp'; import { diff --git a/src/types/types.d.ts b/src/types/types.d.ts deleted file mode 100644 index 32d9bbda39..0000000000 --- a/src/types/types.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -declare module 'libp2p-tcp' { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const TCP: any; - export = TCP; -} -declare module 'libp2p-mplex' { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const Mplex: any; - export = Mplex; -} -declare module 'libp2p-secio' { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const Secio: any; - export = Secio; -} -declare module 'libp2p-websockets'; -declare module 'libp2p-websockets/src/filters';