diff --git a/src/typeUtils.ts b/src/typeUtils.ts index b0da5dd7..66170644 100644 --- a/src/typeUtils.ts +++ b/src/typeUtils.ts @@ -39,11 +39,11 @@ type Omit = Pick>; // RESOLVE_MATCH: '@@found/RESOLVE_MATCH'; // }; -export type Params = Record; +export type Params = Record; export type ParamsDescriptor = Record< string, - string | number | boolean | Record + string | number | boolean | Record | undefined >; // These need to be interfaces to avoid circular reference issues. diff --git a/test/Matcher.test.ts b/test/Matcher.test.ts index a887e06c..94c97763 100644 --- a/test/Matcher.test.ts +++ b/test/Matcher.test.ts @@ -223,8 +223,7 @@ describe('Matcher', () => { const missingMatch = matcher.match({ pathname: '/a' }); if (missingMatch != null && 0 in missingMatch.params) { - // FIXME: This type is wrong. It should be string | undefined. - const param: string = missingMatch.params[0]; + const param: string | undefined = missingMatch.params[0]; expect(param).toBeUndefined(); }