You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
app.js (part of package app, depends on the package dep):
import {foo} from 'dep';
π Actual behavior
When compiling the package app, the compile error is that in dep/index.d.ts, the type TrustedHTML isn't found.
π Expected behavior
No compile errors.
Additional information about the issue
The problem seems to be that a triple-slash directive used to be emitted and now isn't:
/// <reference types="trusted-types" />
This is might due to #57681 however this isn't about not preserving a reference, since the reference used to be generated by the compiler. This is about the compiler newly not generating a required reference at all.
Changing the library code to:
index.ts (as part of package dep)
fixes the problem, but this seems like a bug because before the compiler was correctly inferring that the reference was required for the declaration file, and now it's not.
The text was updated successfully, but these errors were encountered:
π Search Terms
triple slash reference types omitted
#57681
π Version & Regression Information
β― Playground Link
lit/lit#4682
π» Code
I couldn't make a playground that shows the problem, because it requires a dependency.
package.json:
tsconfig.json
index.ts (part of package
dep
)app.js (part of package
app
, depends on the packagedep
):π Actual behavior
When compiling the package
app
, the compile error is that in dep/index.d.ts, the typeTrustedHTML
isn't found.π Expected behavior
No compile errors.
Additional information about the issue
The problem seems to be that a triple-slash directive used to be emitted and now isn't:
/// <reference types="trusted-types" />
This is might due to #57681 however this isn't about not preserving a reference, since the reference used to be generated by the compiler. This is about the compiler newly not generating a required reference at all.
Changing the library code to:
index.ts (as part of package
dep
)fixes the problem, but this seems like a bug because before the compiler was correctly inferring that the reference was required for the declaration file, and now it's not.
The text was updated successfully, but these errors were encountered: