@marko/language-tools 2.0.2 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -321,22 +321,38 @@ declare global {
321
321
  : never;
322
322
 
323
323
  export interface NativeTagRenderer<Name extends string> {
324
- (): () => <Input extends Marko.NativeTags[Name]["input"]>(
325
- input: Input
326
- ) => ReturnAndScope<Scopes<Input>, Marko.NativeTags[Name]["return"]>;
324
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-constraint
325
+ (): () => <__marko_internal_input extends unknown>(
326
+ input: Marko.NativeTags[Name]["input"] &
327
+ Relate<__marko_internal_input, Marko.NativeTags[Name]["input"]>
328
+ ) => ReturnAndScope<
329
+ Scopes<__marko_internal_input>,
330
+ Marko.NativeTags[Name]["return"]
331
+ >;
327
332
  }
328
333
 
329
334
  export interface BodyRenderer<Body extends AnyMarkoBody> {
330
- (): () => <Args extends BodyParameters<Body>>(
331
- input: RenderBodyInput<Args>
332
- ) => ReturnAndScope<Scopes<Args>, BodyReturnType<Body>>;
335
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-constraint
336
+ (): () => <__marko_internal_input extends unknown>(
337
+ input: RenderBodyInput<BodyParameters<Body>> &
338
+ Relate<
339
+ __marko_internal_input,
340
+ RenderBodyInput<BodyParameters<Body>>
341
+ >
342
+ ) => ReturnAndScope<
343
+ Scopes<__marko_internal_input>,
344
+ BodyReturnType<Body>
345
+ >;
333
346
  }
334
347
 
335
348
  export interface BaseRenderer<
336
349
  Input extends Record<PropertyKey, unknown>,
337
350
  Return = void
338
351
  > {
339
- (): () => (input: Input) => ReturnAndScope<Scopes<Input>, Return>;
352
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-constraint
353
+ (): () => <__marko_internal_input extends unknown>(
354
+ input: Input & Relate<__marko_internal_input, Input>
355
+ ) => ReturnAndScope<Scopes<__marko_internal_input>, Return>;
340
356
  }
341
357
 
342
358
  export interface DefaultRenderer {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@marko/language-tools",
3
3
  "description": "Marko Language Tools",
4
- "version": "2.0.2",
4
+ "version": "2.0.3",
5
5
  "bugs": "https://github.com/marko-js/language-server/issues/new?template=Bug_report.md",
6
6
  "dependencies": {
7
7
  "@babel/helper-validator-identifier": "^7.19.1",