ImmutableURLConstructorinterface

{
	new (input: URLString | ImmutableURL, base?: URLString | ImmutableURL): ImmutableURL;
	new (input: URLString | ImmutableURL | string, base: URLString | ImmutableURL): ImmutableURL;
}

Construct a correctly-typed URL object.

  • This is a more correctly typed version of the builtin Javascript URL constructor.
  • Requires a URL string, URL object, or path as input, and optionally a base URL.
  • If a path is provided as input, a base URL must also be provided.
  • The returned type is