Skip to content

Commit

Permalink
chore(types): updates for tsc 5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Jun 20, 2024
1 parent 00e0a76 commit 70f4106
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/bundle-source/src/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ export const makeFileWriter = (
* fs: Pick<import('fs'), 'existsSync'> &
* { promises: Pick<
* import('fs/promises'),
* 'readFile' | 'stat' | 'writeFile' | 'mkdir' | 'rm'
* 'readFile' | 'stat' | 'writeFile' | 'mkdir' | 'rename' | 'rm'
* >,
* },
* path: Pick<import('path'), 'resolve' | 'relative' | 'normalize'>,
* path: Pick<import('path'), 'dirname' | 'resolve' | 'relative' | 'normalize'>,
* os: Pick<import('os'), 'platform'>,
* }} io
* @param {number} [pid]
Expand Down
3 changes: 2 additions & 1 deletion packages/marshal/src/encodePassable.js
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,7 @@ const liberalDecoders = /** @type {Required<DecodeOptions>} */ (
*/
const makeInnerDecode = (decodeStringSuffix, decodeArray, options) => {
const { decodeRemotable, decodePromise, decodeError } = options;
/** @type {(encoded: string, skip?: number) => Passable} */
const innerDecode = (encoded, skip = 0) => {
switch (encoded.charAt(skip)) {
case 'v': {
Expand Down Expand Up @@ -715,6 +716,7 @@ const makeInnerDecode = (decodeStringSuffix, decodeArray, options) => {
}
case '[':
case '^': {
// @ts-expect-error Type 'unknown[]' is not Passable
return decodeArray(encoded, innerDecode, skip);
}
case '(': {
Expand All @@ -728,7 +730,6 @@ const makeInnerDecode = (decodeStringSuffix, decodeArray, options) => {
}
}
};
// @ts-expect-error Type 'unknown' is not assignable to type 'Passable<PassableCap, Error>'.
return innerDecode;
};

Expand Down

0 comments on commit 70f4106

Please sign in to comment.