Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Local fork] TC 39 decorators #3790

Merged
merged 21 commits into from
Nov 11, 2023
Merged

[Local fork] TC 39 decorators #3790

merged 21 commits into from
Nov 11, 2023

Conversation

mweststrate
Copy link
Member

Local fork with additional updates to @Matchlighter 's awesome work.

Follow progress in #3638

Copy link

changeset-bot bot commented Nov 1, 2023

🦋 Changeset detected

Latest commit: ca9e18a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
mobx Minor
mobx-react Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@mweststrate
Copy link
Member Author

@render preview

@mweststrate mweststrate merged commit c926097 into main Nov 11, 2023
4 checks passed
@github-actions github-actions bot mentioned this pull request Nov 11, 2023
@williamdes
Copy link

This triggers a compilation error.
6.10.x are the last working versions for me.
Should TypeScript 5.x be required ? I am using TS 4.

Error: node_modules/mobx/dist/api/annotation.d.ts:11:42 - error TS2304: Cannot find name 'DecoratorContext'.

11     decorate_20223_(value: any, context: DecoratorContext): any;
                                            ~~~~~~~~~~~~~~~~


Error: node_modules/mobx/dist/api/decorators.d.ts:19:68 - error TS2304: Cannot find name 'DecoratorContext'.

19 export declare function is20223Decorator(context: any): context is DecoratorContext;
                                                                      ~~~~~~~~~~~~~~~~


Error: node_modules/mobx/dist/api/decorators.d.ts:20:59 - error TS2304: Cannot find name 'DecoratorContext'.

20 export declare function assert20223DecoratorType(context: DecoratorContext, types: DecoratorContext["kind"][]): void;
                                                             ~~~~~~~~~~~~~~~~


Error: node_modules/mobx/dist/api/decorators.d.ts:20:84 - error TS2304: Cannot find name 'DecoratorContext'.

** Angular Live Development Server is listening on 0.0.0.0:4200, open your browser on http://localhost:4200/ **


20 export declare function assert20223DecoratorType(context: DecoratorContext, types: DecoratorContext["kind"][]): void;
                                                                                      ~~~~~~~~~~~~~~~~


Error: node_modules/mobx/dist/types/decorator_fills.d.ts:1:71 - error TS2552: Cannot find name 'ClassAccessorDecoratorTarget'. Did you mean 'ClassAccessorDecorator'?

1 export type ClassAccessorDecorator<This = any, Value = any> = (value: ClassAccessorDecoratorTarget<This, Value>, context: ClassAccessorDecoratorContext) => ClassAccessorDecoratorResult<This, Value> | void;
                                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/mobx/dist/types/decorator_fills.d.ts:1:123 - error TS2552: Cannot find name 'ClassAccessorDecoratorContext'. Did you mean 'ClassAccessorDecorator'?

1 export type ClassAccessorDecorator<This = any, Value = any> = (value: ClassAccessorDecoratorTarget<This, Value>, context: ClassAccessorDecoratorContext) => ClassAccessorDecoratorResult<This, Value> | void;
                                                                                                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/mobx/dist/types/decorator_fills.d.ts:1:157 - error TS2552: Cannot find name 'ClassAccessorDecoratorResult'. Did you mean 'ClassAccessorDecorator'?

1 export type ClassAccessorDecorator<This = any, Value = any> = (value: ClassAccessorDecoratorTarget<This, Value>, context: ClassAccessorDecoratorContext) => ClassAccessorDecoratorResult<This, Value> | void;
                                                                                                                                                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~


✖ Failed to compile.

Error: node_modules/mobx/dist/types/decorator_fills.d.ts:2:101 - error TS2552: Cannot find name 'ClassGetterDecoratorContext'. Did you mean 'ClassGetterDecorator'?

2 export type ClassGetterDecorator<This = any, Value = any> = (value: (this: This) => Value, context: ClassGetterDecoratorContext) => ((this: This) => Value) | void;
                                                                                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/mobx/dist/types/decorator_fills.d.ts:3:114 - error TS2552: Cannot find name 'ClassSetterDecoratorContext'. Did you mean 'ClassSetterDecorator'?

3 export type ClassSetterDecorator<This = any, Value = any> = (value: (this: This, value: Value) => void, context: ClassSetterDecoratorContext) => ((this: This, value: Value) => void) | void;
                                                                                                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/mobx/dist/types/decorator_fills.d.ts:4:114 - error TS2552: Cannot find name 'ClassMethodDecoratorContext'. Did you mean 'ClassMethodDecorator'?

4 export type ClassMethodDecorator<This = any, Value extends (...p: any[]) => any = any> = (value: Value, context: ClassMethodDecoratorContext<This, Value>) => Value | void;
                                                                                                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/mobx/dist/types/decorator_fills.d.ts:5:113 - error TS2552: Cannot find name 'ClassFieldDecoratorContext'. Did you mean 'ClassFieldDecorator'?

5 export type ClassFieldDecorator<This = any, Value extends (...p: any[]) => any = any> = (value: Value, context: ClassFieldDecoratorContext<This, Value>) => Value | void;
                                                                                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~

@mweststrate
Copy link
Member Author

mweststrate commented Mar 20, 2024 via email

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.

4 participants