@ignore
| 4928 | |
| 4929 | /** @ignore */ |
| 4930 | class URL$ extends transformOrFail( |
| 4931 | String$.annotations({ description: "a string to be decoded into a URL" }), |
| 4932 | URLFromSelf, |
| 4933 | { |
| 4934 | strict: true, |
| 4935 | decode: (i, _, ast) => |
| 4936 | ParseResult.try({ |
| 4937 | try: () => new URL(i), |
| 4938 | catch: (e) => |
| 4939 | new ParseResult.Type( |
| 4940 | ast, |
| 4941 | i, |
| 4942 | `Unable to decode ${JSON.stringify(i)} into a URL. ${getErrorMessage(e)}` |
| 4943 | ) |
| 4944 | }), |
| 4945 | encode: (a) => ParseResult.succeed(a.toString()) |
| 4946 | } |
| 4947 | ).annotations({ |
| 4948 | identifier: "URL", |
| 4949 | pretty: () => (url) => url.toString() |
| 4950 | }) {} |
| 4951 | |
| 4952 | export { |
| 4953 | /** |
nothing calls this directly
no test coverage detected