Skip to content

Type Alias: URLPatternLike

API / @xmachines/play-url / index / URLPatternLike

type URLPatternLike = object;

Defined in: packages/play-url/src/url-pattern-utils.ts:52

The minimal structural type of the part of URLPattern that this package uses.

The type is the published contract of this module, and it names the native API and the polyfill both. It also keeps the global declarations of urlpattern-polyfill out of the emitted .d.ts of this package.

Methods

exec()

exec(input):
| {
pathname: {
groups: Record<string, string | undefined>;
};
}
| null;

Defined in: packages/play-url/src/url-pattern-utils.ts:53

Parameters

ParameterType
input{ pathname: string; }
input.pathnamestring

Returns

| { pathname: { groups: Record<string, string | undefined>; }; } | null


test()

test(input): boolean;

Defined in: packages/play-url/src/url-pattern-utils.ts:56

Parameters

ParameterType
input{ pathname: string; }
input.pathnamestring

Returns

boolean