[lit-html] `DirectiveResult` is just an empty interface
Which package(s) are affected?
Lit Core (lit / lit-html / lit-element / reactive-element)
Description
Currently, when you type something(eg. a function call) to receive a DirectiveResult, you're basically typing that argument to the function as an empty interface, which is basically as good as saying anything could fit in there. This seems to be because all the properties in the DirectiveResult type are marked as internal properties. Coupled with the fact that stripInternal is enabled in the project tsconfig.json, this essentially removes all properties of the DirectiveResult interface by the time the package reaches the consumer. This makes it not much useful at all for providing type information from the package consumer's perspective.
Reproduction
Type anything to receive a DirectiveResult and watch it receive basically anything with no type errors whatsoever.
Workaround
I have not found a workaround.
Is this a regression?
No or unsure. This never worked, or I haven't tried before.
Affected versions
3.1.3
Browser/OS/Node environment
Browser: Chrome 131.0.6778.108 (Official Build) (64-bit) OS: Ubuntu 24.04.1 LTS Node version: 20.10.1 pnpm version: 9.15.1
Source: lit/lit