Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@roziscoding
Copy link

@roziscoding roziscoding commented Mar 22, 2025

Related to grammyjs/grammY#709

BREAKING CHANGE: I18nFlavor now needs to be used as I18nFlavor<Context>
@roziscoding roziscoding changed the title chore: add import permission to test task chore: make context flavor transformative Mar 22, 2025
type MyContext =
& Context
& I18nFlavor
& I18nFlavor<Context>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those aren't correctly combined

type MyContext =
& Context
& I18nFlavor
& I18nFlavor<Context>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

ctx: C,
): ctx is HearsContext<C> {
export function hears<C extends Context>(key: string) {
return function <TContext extends I18nFlavor<C>>(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this is better than removing the type parameter from hears and then doing

Suggested change
return function <TContext extends I18nFlavor<C>>(
return function <C extends Context, CTContext extends I18nFlavor<C>>(

@KnorpelSenf
Copy link
Member

I don't think you should target main just yet

@dcdunkan dcdunkan mentioned this pull request May 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants