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

The type of compilation.errors changes to any after 0.6.4 #6512

Closed
colinaaa opened this issue May 11, 2024 · 3 comments
Closed

The type of compilation.errors changes to any after 0.6.4 #6512

colinaaa opened this issue May 11, 2024 · 3 comments
Assignees

Comments

@colinaaa
Copy link
Contributor

colinaaa commented May 11, 2024

#6300 made a breaking change by changing the type of compilation.errors to any.

In @rspack/[email protected]:

class Compilation {
    get errors(): {
        push: (...errs: (Error | JsStatsError | string)[]) => void;
        readonly length: number;
        [Symbol.iterator](): {
            next(): {
                done: boolean;
                value?: undefined;
            } | {
                value: JsStatsError;
                done: boolean;
            };
        };
    };
    get warnings(): {
        push: (...warns: (Error | JsStatsError)[]) => void;
        [Symbol.iterator](): {
            next(): {
                done: boolean;
                value?: undefined;
            } | {
                value: import("@rspack/binding").JsStatsWarning[];
                done: boolean;
            };
        };
    };
}

In @rspack/[email protected]:

class Compilation {
    get errors(): any;
    get warnings(): JsStatsWarning[];
}

Originally posted by @colinaaa in #6300 (comment)

@colinaaa
Copy link
Contributor Author

I think it makes sense to use JsStatsError[] for compilation.errors.

 class Compilation {
-    get errors(): any;
+    get errors(): JsStatsError[];
     get warnings(): JsStatsWarning[];
 }

cc @coder-xiaotian @h-a-n-a

@h-a-n-a
Copy link
Collaborator

h-a-n-a commented May 11, 2024

Yes, and this will be changed it in the latest v0.7

@h-a-n-a h-a-n-a self-assigned this May 13, 2024
@h-a-n-a
Copy link
Collaborator

h-a-n-a commented May 27, 2024

closes as fixed

@h-a-n-a h-a-n-a closed this as completed May 27, 2024
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

No branches or pull requests

2 participants