Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ The current pieces are (more to come):

A simple and fast type stripper.

### [TypedURLPattern](./packages/typed-url-pattern/README.md)

A tiny wrapper around `URLPattern` to create type safe routes, endpoints and
links. Params are parsed and validated with `StandardSchema`

### [Functorial](./packages/functorial/README.md)

A new `Proxy`-based reactivity system, that goes beyond Signals. It's more
Expand Down
2 changes: 1 addition & 1 deletion packages/functorial/deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@f-stack/functorial",
"version": "0.3.0",
"version": "0.3.1",
"license": "MIT",
"exports": {
".": "./src/reactive.ts"
Expand Down
10 changes: 9 additions & 1 deletion packages/typed-url-pattern/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ providing:

## Install

Depending on your package manager:

```sh
deno add jsr:@f-stack/typed-url-pattern
pnpm i jsr:@f-stack/typed-url-pattern
npx jsr add @f-stack/typed-url-pattern
```

## Common patterns

- **Typed named parameters**
Expand Down Expand Up @@ -152,4 +160,4 @@ const href2 = route.href({
href2 === "https://example.com/42-mycake?page=2";
```

## API
## [API](https://jsr.io/@f-stack/typed-url-pattern/doc)
Binary file added packages/typed-url-pattern/assets/demo.mp4
Binary file not shown.
16 changes: 8 additions & 8 deletions packages/typed-url-pattern/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ export type AreAllKeysOptional<T> = {} extends FilterRequiredKeys<T> ? true
/** @internal */
export type And<T extends boolean, U extends boolean> =
T extends true
? U extends true
? true
: false
: false;
? U extends true
? true
: false
: false;

// deno-fmt-ignore
/** @internal */
export type Or<T extends boolean, U extends boolean> =
T extends true
? true
: U extends true
? true
: false;
? true
: U extends true
? true
: false;

/**
* Extracts the BaseURL from the input URL
Expand Down