Skip to content

Commit

Permalink
fix: publish
Browse files Browse the repository at this point in the history
  • Loading branch information
3rd committed May 17, 2024
1 parent 79e26fe commit 4ee3856
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@ type DebugHasWildcard = HasWildcard<"zap.*.zup">;
type DebugInferListener = InferSubscriptionListener<typeof testSchema, "bar.baz">;
type DebugSubscriptionListeners = SubscriptionListeners<typeof testSchema>;

const testSchemaPaths: "foo" | "bar.baz" | "zap.zop.zup" = {} as SchemaPath<typeof testSchema>;
const testSchemaPaths: "bar.baz" | "foo" | "zap.zop.zup" = {} as SchemaPath<typeof testSchema>;
const testWildcardPaths:
| "foo"
| "*.*.*"
| "*.*.zup"
| "*.*"
| "*.baz"
| "*.zop.*"
| "*.zop.zup"
| "*"
| "bar.baz"
| "zap.zop.zup"
| "zap.*.zup"
| "bar.*"
| "*.baz"
| "*.*"
| "bar.baz"
| "foo"
| "zap.*.*"
| "zap.zop.*"
| "zap.*.zup"
| "zap.*"
| "*.zop.zup"
| "*.*.*"
| "*.zop.*"
| "*.*.zup" = {} as WildcardPath<SchemaPath<typeof testSchema>>;
| "zap.zop.*"
| "zap.zop.zup" = {} as WildcardPath<SchemaPath<typeof testSchema>>;

const testHasWildcard: true = {} as HasWildcard<"*">;
const testHasWildcard2: true = {} as HasWildcard<"*.zop.zup">;
Expand All @@ -52,7 +52,7 @@ const testInferFooListener: (data: { field: string }, event: "foo") => void = {}
"foo"
>;
const testInferBarBazListener: InferSubscriptionListener<typeof testSchema, "bar.baz"> = (
data: { field: string | number },
data: { field: number | string },
event: "bar.baz"
) => {};
const testInferWildcardListener: InferSubscriptionListener<typeof testSchema, "bar.*"> = (
Expand All @@ -63,7 +63,7 @@ const testInferWildcardListener: InferSubscriptionListener<typeof testSchema, "b
const testSubscriptionListeners: {
foo: (data: { field: string }, event: "foo") => void;
"*": (data: unknown, event: string) => void;
"bar.baz": (data: { field: string | number }, event: "bar.baz") => void;
"bar.baz": (data: { field: number | string }, event: "bar.baz") => void;
"bar.*": (data: unknown, event: string) => void;
"*.baz": (data: unknown, event: string) => void;
"*.*": (data: unknown, event: string) => void;
Expand Down

0 comments on commit 4ee3856

Please sign in to comment.