Skip to content

Commit

Permalink
Fix a type
Browse files Browse the repository at this point in the history
  • Loading branch information
wojpawlik committed Jan 2, 2025
1 parent 0ed7b79 commit a55168c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3171,7 +3171,7 @@ type CommandContextCore =
*/
export type CommandContext<C extends Context> = FilterQueryContext<
NarrowMatch<C, string>,
":entities:bot_command"
"::bot_command"
>;
type NarrowMatchCore<T extends Context["match"]> = { match: T };
type NarrowMatch<C extends Context, T extends C["match"]> = {
Expand Down
2 changes: 1 addition & 1 deletion test/composer.type.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ describe("Composer types", () => {
const channelPostCaption = ctx.channelPost?.caption;
const channelPostText = ctx.channelPost?.text;
const match = ctx.match;
assertType<IsExact<typeof msgText, string>>(true);
assertType<IsExact<typeof msgText, string | undefined>>(true);
assertType<IsExact<typeof messageCaption, string | undefined>>(
true,
);
Expand Down

0 comments on commit a55168c

Please sign in to comment.