Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/grammy/filter.ts>Filter

The Telegram Bot Framework.
Very Popular
Go to Latest
type alias Filter
import { type Filter } from "https://deno.land/x/grammy@v1.31.2/filter.ts";

This type infers which properties will be present on the given context object provided it matches the given filter query. If the filter query is a union type, the produced context object will be a union of possible combinations, hence allowing you to narrow down manually which of the properties are present.

In some sense, this type computes matchFilter on the type level.

Type Parameters

C extends Context
Q extends FilterQuery
definition: PerformQuery<C, RunQuery<ExpandShortcuts<Q>>>