Skip to content

Commit

Permalink
Fix some type issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrtenz committed Nov 16, 2023
1 parent b8f37b8 commit ed0a950
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// eslint-disable-next-line import/unambiguous
declare module 'readable-stream' {
export type {
DuplexOptions,
Readable,
Writable,
TransformCallback,
} from 'stream';
export { Transform, Duplex, pipeline } from 'stream';
}
2 changes: 1 addition & 1 deletion packages/snaps-controllers/src/snaps/location/npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export class NpmLocation implements SnapLocation {
`${canonicalBase}/${this.meta.packageName}/`,
this.files,
),
(error) => {
(error: unknown) => {
error ? reject(error) : resolve();
},
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
// eslint-disable-next-line import/unambiguous
declare module 'readable-stream' {
export type { TransformCallback } from 'stream';
export type {
DuplexOptions,
Readable,
Writable,
TransformCallback,
} from 'stream';
export { Duplex, pipeline } from 'stream';
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
// eslint-disable-next-line import/unambiguous
declare module 'readable-stream' {
export type { DuplexOptions, Readable, TransformCallback } from 'stream';
export type {
DuplexOptions,
Readable,
Writable,
TransformCallback,
} from 'stream';
export { Duplex, pipeline } from 'stream';
}
2 changes: 1 addition & 1 deletion packages/snaps-simulator/src/features/simulation/sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export function* initSaga({ payload }: PayloadAction<string>) {
const mux = setupMultiplex(rpcStream, 'snapStream');
const stream = mux.createStream('metamask-provider');
const providerStream = createEngineStream({ engine });
pipeline(stream, providerStream, stream, (error) => {
pipeline(stream, providerStream, stream, (error: unknown) => {
if (error) {
logError(`Provider stream failure.`, error);
}
Expand Down

0 comments on commit ed0a950

Please sign in to comment.