Remove local type definitions for Karma to not return "not found"

This commit is contained in:
Franck Royer 2021-07-14 12:25:23 +10:00
parent d24afafc82
commit e443237a81
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
7 changed files with 16 additions and 17 deletions

View File

@ -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/';

View File

@ -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';

View File

@ -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';

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

17
src/types/types.d.ts vendored
View File

@ -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';