Skip to content
Myr

fix(utils/url): specify the return type of `tryDecodeURI` (#4779)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Yusuke Wada · committed by GitHub · parent 6a0607a · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:src/utils/url.ts+1 added-1 removed
99 unmodified lines
100 * @example101 * tryDecodeURI('Hello%20World') // 'Hello World'102 * tryDecodeURI('Hello%20World/%A4%A2') // 'Hello World/%A4%A2'103 */104export const tryDecodeURI = (str: string) => tryDecode(str, decodeURI)104export const tryDecodeURI = (str: string): string => tryDecode(str, decodeURI)105106export const getPath = (request: Request): string => {107 const url = request.url108 const start = url.indexOf('/', url.indexOf(':') + 4)
211 unmodified lines