sindresorhus/normalize-url

The type definition of removeDirectoryIndex is not correct

Closed this issue · 0 comments

normalizeUrl('www.sindresorhus.com/foo/default.php', { removeDirectoryIndex: true });
// Type 'true' is not assignable to type 'readonly (string | RegExp)[] | undefined'.

In readme.md, type of removeDirectoryIndex is boolean | Array<RegExp | string>, but in index.d.ts, it is ReadonlyArray<RegExp | string>.