-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix: explictly declare types for mixin base classes #12876
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
||
export const _MatButtonMixinBase: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These mixins are getting more and more inconvenient to consume :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to file an issue with TypeScript to see if they can be smarter about keeping the original import paths
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. (sample of the generated import()
statements for later reference: here)
We could probably also fix this by moving the typings/
directories on directory up (in the release output). But this is not really that predictable than just being explicit.
src/cdk/collections/selection.ts
Outdated
@@ -39,7 +39,7 @@ export class SelectionModel<T> { | |||
/** | |||
* Event emitted when the value has changed. | |||
* @deprecated Use `changed` instead. | |||
* @breaking-change 8.0.0 To be changed to `changed` | |||
* @deletion-target 8.0.0 To be changed to `changed` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this stay as @breaking-change
?
As of TypeScript 2.9, tsc will inline imports for inferred types with the `import("...")` syntax. However, this inlining happens *after* `paths` are resolved. This means that in places where we import from `@angular/material/core` in source end up having relative paths (e.g. `../core/common-behaviors/index`) in the generated d.ts files. These relative import paths become incorrect when moved into our package structure, breaking downstream apps.
300b2ce
to
3ad85f8
Compare
Removes a workaround that was initially introduced to get angular#12182 through. The root issue has been resolved in angular#12876.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
As of TypeScript 2.9, tsc will inline imports for inferred types with
the
import("...")
syntax. However, this inlining happens afterpaths
are resolved. This means that in places where we import from@angular/material/core
in source end up having relative paths (e.g.../core/common-behaviors/index
) in the generated d.ts files. Theserelative import paths become incorrect when moved into our package
structure, breaking downstream apps.
cc @IgorMinar, @devversion FYI