@marko/ts-plugin 0.0.0 → 3.1.0

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.
Files changed (114) hide show
  1. package/README.md +29 -0
  2. package/dist/index.d.ts +2 -0
  3. package/dist/index.js +673 -0
  4. package/dist/index.js.map +6 -0
  5. package/dist/lib.decorators.d.ts +382 -0
  6. package/dist/lib.decorators.legacy.d.ts +20 -0
  7. package/dist/lib.dom.asynciterable.d.ts +18 -0
  8. package/dist/lib.dom.d.ts +45125 -0
  9. package/dist/lib.dom.iterable.d.ts +18 -0
  10. package/dist/lib.es2015.collection.d.ts +150 -0
  11. package/dist/lib.es2015.core.d.ts +595 -0
  12. package/dist/lib.es2015.d.ts +26 -0
  13. package/dist/lib.es2015.generator.d.ts +75 -0
  14. package/dist/lib.es2015.iterable.d.ts +603 -0
  15. package/dist/lib.es2015.promise.d.ts +79 -0
  16. package/dist/lib.es2015.proxy.d.ts +126 -0
  17. package/dist/lib.es2015.reflect.d.ts +142 -0
  18. package/dist/lib.es2015.symbol.d.ts +44 -0
  19. package/dist/lib.es2015.symbol.wellknown.d.ts +324 -0
  20. package/dist/lib.es2016.array.include.d.ts +114 -0
  21. package/dist/lib.es2016.d.ts +19 -0
  22. package/dist/lib.es2016.full.d.ts +21 -0
  23. package/dist/lib.es2016.intl.d.ts +29 -0
  24. package/dist/lib.es2017.arraybuffer.d.ts +19 -0
  25. package/dist/lib.es2017.d.ts +24 -0
  26. package/dist/lib.es2017.date.d.ts +29 -0
  27. package/dist/lib.es2017.full.d.ts +21 -0
  28. package/dist/lib.es2017.intl.d.ts +42 -0
  29. package/dist/lib.es2017.object.d.ts +47 -0
  30. package/dist/lib.es2017.sharedmemory.d.ts +133 -0
  31. package/dist/lib.es2017.string.d.ts +43 -0
  32. package/dist/lib.es2017.typedarrays.d.ts +51 -0
  33. package/dist/lib.es2018.asyncgenerator.d.ts +75 -0
  34. package/dist/lib.es2018.asynciterable.d.ts +51 -0
  35. package/dist/lib.es2018.d.ts +22 -0
  36. package/dist/lib.es2018.full.d.ts +22 -0
  37. package/dist/lib.es2018.intl.d.ts +81 -0
  38. package/dist/lib.es2018.promise.d.ts +28 -0
  39. package/dist/lib.es2018.regexp.d.ts +35 -0
  40. package/dist/lib.es2019.array.d.ts +77 -0
  41. package/dist/lib.es2019.d.ts +22 -0
  42. package/dist/lib.es2019.full.d.ts +22 -0
  43. package/dist/lib.es2019.intl.d.ts +21 -0
  44. package/dist/lib.es2019.object.d.ts +31 -0
  45. package/dist/lib.es2019.string.d.ts +35 -0
  46. package/dist/lib.es2019.symbol.d.ts +22 -0
  47. package/dist/lib.es2020.bigint.d.ts +763 -0
  48. package/dist/lib.es2020.d.ts +25 -0
  49. package/dist/lib.es2020.date.d.ts +40 -0
  50. package/dist/lib.es2020.full.d.ts +22 -0
  51. package/dist/lib.es2020.intl.d.ts +472 -0
  52. package/dist/lib.es2020.number.d.ts +26 -0
  53. package/dist/lib.es2020.promise.d.ts +45 -0
  54. package/dist/lib.es2020.sharedmemory.d.ts +97 -0
  55. package/dist/lib.es2020.string.d.ts +42 -0
  56. package/dist/lib.es2020.symbol.wellknown.d.ts +39 -0
  57. package/dist/lib.es2021.d.ts +21 -0
  58. package/dist/lib.es2021.full.d.ts +22 -0
  59. package/dist/lib.es2021.intl.d.ts +164 -0
  60. package/dist/lib.es2021.promise.d.ts +46 -0
  61. package/dist/lib.es2021.string.d.ts +31 -0
  62. package/dist/lib.es2021.weakref.d.ts +76 -0
  63. package/dist/lib.es2022.array.d.ts +119 -0
  64. package/dist/lib.es2022.d.ts +23 -0
  65. package/dist/lib.es2022.error.d.ts +73 -0
  66. package/dist/lib.es2022.full.d.ts +22 -0
  67. package/dist/lib.es2022.intl.d.ts +143 -0
  68. package/dist/lib.es2022.object.d.ts +24 -0
  69. package/dist/lib.es2022.regexp.d.ts +37 -0
  70. package/dist/lib.es2022.string.d.ts +23 -0
  71. package/dist/lib.es2023.array.d.ts +922 -0
  72. package/dist/lib.es2023.collection.d.ts +19 -0
  73. package/dist/lib.es2023.d.ts +20 -0
  74. package/dist/lib.es2023.full.d.ts +22 -0
  75. package/dist/lib.es2023.intl.d.ts +62 -0
  76. package/dist/lib.es2024.arraybuffer.d.ts +63 -0
  77. package/dist/lib.es2024.collection.d.ts +27 -0
  78. package/dist/lib.es2024.d.ts +24 -0
  79. package/dist/lib.es2024.full.d.ts +22 -0
  80. package/dist/lib.es2024.object.d.ts +27 -0
  81. package/dist/lib.es2024.promise.d.ts +33 -0
  82. package/dist/lib.es2024.regexp.d.ts +23 -0
  83. package/dist/lib.es2024.sharedmemory.d.ts +66 -0
  84. package/dist/lib.es2024.string.d.ts +27 -0
  85. package/dist/lib.es2025.collection.d.ts +94 -0
  86. package/dist/lib.es2025.d.ts +23 -0
  87. package/dist/lib.es2025.float16.d.ts +443 -0
  88. package/dist/lib.es2025.full.d.ts +22 -0
  89. package/dist/lib.es2025.intl.d.ts +200 -0
  90. package/dist/lib.es2025.iterator.d.ts +146 -0
  91. package/dist/lib.es2025.promise.d.ts +32 -0
  92. package/dist/lib.es2025.regexp.d.ts +30 -0
  93. package/dist/lib.es5.d.ts +4599 -0
  94. package/dist/lib.es6.d.ts +21 -0
  95. package/dist/lib.esnext.array.d.ts +33 -0
  96. package/dist/lib.esnext.collection.d.ts +47 -0
  97. package/dist/lib.esnext.d.ts +27 -0
  98. package/dist/lib.esnext.date.d.ts +21 -0
  99. package/dist/lib.esnext.decorators.d.ts +26 -0
  100. package/dist/lib.esnext.disposable.d.ts +191 -0
  101. package/dist/lib.esnext.error.d.ts +22 -0
  102. package/dist/lib.esnext.full.d.ts +22 -0
  103. package/dist/lib.esnext.intl.d.ts +107 -0
  104. package/dist/lib.esnext.sharedmemory.d.ts +23 -0
  105. package/dist/lib.esnext.temporal.d.ts +485 -0
  106. package/dist/lib.esnext.typedarrays.d.ts +90 -0
  107. package/dist/lib.scripthost.d.ts +320 -0
  108. package/dist/lib.webworker.asynciterable.d.ts +18 -0
  109. package/dist/lib.webworker.d.ts +15606 -0
  110. package/dist/lib.webworker.importscripts.d.ts +21 -0
  111. package/dist/lib.webworker.iterable.d.ts +18 -0
  112. package/dist/marko.internal.d.ts +730 -0
  113. package/dist/marko.runtime.d.ts +410 -0
  114. package/package.json +35 -1
@@ -0,0 +1,410 @@
1
+ import "./tags-html";
2
+
3
+ declare module "*.marko" {
4
+ const template: Marko.Template;
5
+ export default template;
6
+ }
7
+
8
+ declare global {
9
+ namespace NodeJS {
10
+ interface ReadableStream {}
11
+ }
12
+
13
+ namespace Marko {
14
+ /** A mutable global object for the current render. */
15
+ export interface Global {
16
+ [x: PropertyKey]: unknown;
17
+ /** An AbortSignal instance that, when aborted, stops further streamed content. */
18
+ signal?: AbortSignal;
19
+ /** A CSP Nonce to add to each script output from Marko. */
20
+ cspNonce?: string;
21
+ /** Used for rendering multiple Marko templates in a single hydrated page. */
22
+ renderId?: string;
23
+ /** Used to uniquely identify a instance of a Marko runtime. */
24
+ runtimeId?: string;
25
+ /** A list of globals that should be serialized to the browser. */
26
+ serializedGlobals?: Record<string, boolean>;
27
+ /** @deprecated prefer `renderId` */
28
+ widgetIdPrefix?: string;
29
+ /** @deprecated prefer `renderId` */
30
+ componentIdPrefix?: string;
31
+ }
32
+
33
+ export type TemplateInput<Input> = Input & {
34
+ $global?: Global;
35
+ };
36
+
37
+ /** The result of calling `template.render`. */
38
+ export type RenderedTemplate<Component = unknown> = Promise<
39
+ Component extends Marko.Component ? RenderResult<Component> : string
40
+ > &
41
+ AsyncIterable<string> & {
42
+ toReadable(): ReadableStream<Uint8Array<ArrayBufferLike>>;
43
+ pipe(stream: {
44
+ write(chunk: string): unknown;
45
+ end(): unknown;
46
+ flush?(): void;
47
+ }): void;
48
+ toString(): string;
49
+ };
50
+
51
+ /** The result of calling `template.mount`. */
52
+ export type MountedTemplate<Input = unknown, Return = unknown> = {
53
+ get value(): Return extends { value: infer Value } ? Value : void;
54
+ set value(
55
+ next: Return extends { valueChange?(next: infer Next): any }
56
+ ? Next
57
+ : never,
58
+ );
59
+ update(input: Marko.TemplateInput<Input>): void;
60
+ destroy(): void;
61
+ };
62
+
63
+ export interface Out<
64
+ Component = unknown,
65
+ > extends Marko.RenderedTemplate<Component> {
66
+ /** The underlying ReadableStream Marko is writing into. */
67
+ stream: unknown;
68
+ /** A mutable global object for the current render. */
69
+ global: Global;
70
+ /** Disable all async rendering. Will error if something beings async. */
71
+ sync(): void;
72
+ /** Returns true if async rendering is disabled. */
73
+ isSync(): boolean;
74
+ /** Write unescaped text at the current stream position. */
75
+ write(val: string | void): this;
76
+ /** Write javascript content to be merged with the scripts Marko sends out on the next flush. */
77
+ script(val: string | void): this;
78
+ /** Starts a new async/forked stream. */
79
+ beginAsync(options?: {
80
+ name?: string;
81
+ timeout?: number;
82
+ last?: boolean;
83
+ }): Out;
84
+ /** Marks the current stream as complete (async streams may still be executing). */
85
+ end(val?: string | void): this;
86
+ emit(eventName: PropertyKey, ...args: any[]): boolean;
87
+ on(eventName: PropertyKey, listener: (...args: any[]) => any): this;
88
+ once(eventName: PropertyKey, listener: (...args: any[]) => any): this;
89
+ prependListener(
90
+ eventName: PropertyKey,
91
+ listener: (...args: any[]) => any,
92
+ ): this;
93
+ removeListener(
94
+ eventName: PropertyKey,
95
+ listener: (...args: any[]) => any,
96
+ ): this;
97
+ /** Register a callback executed when the last async out has completed. */
98
+ onLast(listener: (next: () => void) => unknown): this;
99
+ /** Emits an error on the stream. */
100
+ error(e: Error): this;
101
+ /** Schedules a Marko to flush buffered html to the underlying stream. */
102
+ flush(): this;
103
+ /** Creates a detached out stream (used for out of order flushing). */
104
+ createOut(): Out;
105
+ /** Write escaped text at the current stream position. */
106
+ text(val: string | void): void;
107
+ }
108
+
109
+ /** Body content created from by a component, typically held in an object with a renderBody property. */
110
+
111
+ export interface Body<
112
+ in Params extends readonly any[] = [],
113
+ out Return = void,
114
+ > {}
115
+
116
+ /** Valid data types which can be passed in as a <${dynamic}/> tag name. */
117
+ export type Renderable =
118
+ | { renderBody: Body<any, any> | Template | string }
119
+ | Body<any, any>
120
+ | Template
121
+ | string;
122
+
123
+ /** Extract the return tag type from a renderBody. */
124
+ export type BodyReturnType<B> =
125
+ B extends Body<any, infer Return> ? Return : never;
126
+
127
+ /** Extract the tag parameter types received by a renderBody. */
128
+ export type BodyParameters<B> =
129
+ B extends Body<infer Params, any> ? Params : never;
130
+
131
+ export class Component<
132
+ Input = unknown,
133
+ State = unknown,
134
+ > implements Emitter {
135
+ /** A unique id for this instance. */
136
+ public readonly id: string;
137
+ /** The top level element rendered by this instance. */
138
+ public readonly el: Element | void;
139
+ /** The attributes passed to this instance. */
140
+ public readonly input: Input;
141
+ /** @deprecated */
142
+ public readonly els: Element[];
143
+ /** Mutable state that when changed causes a rerender. */
144
+ state: State;
145
+
146
+ /** Returns the amount of event handlers listening to a specific event. */
147
+ listenerCount(eventName: PropertyKey): number;
148
+ /**
149
+ * Used to wrap an existing event emitted and ensure that all events are
150
+ * cleaned up once this component is destroyed
151
+ * */
152
+ subscribeTo(
153
+ emitter: unknown,
154
+ ): Omit<Emitter, "listenerCount" | "prependListener" | "emit">;
155
+ /** Emits an event on the component instance. */
156
+ emit(eventName: PropertyKey, ...args: any[]): boolean;
157
+ /** Listen to an event on the component instance. */
158
+ on(eventName: PropertyKey, listener: (...args: any[]) => any): this;
159
+ /** Listen to an event on the component instance once. */
160
+ once(eventName: PropertyKey, listener: (...args: any[]) => any): this;
161
+ /** Listen to an event on the component instance before all other listeners. */
162
+ prependListener(
163
+ eventName: PropertyKey,
164
+ listener: (...args: any[]) => any,
165
+ ): this;
166
+ /** Remove a listener from the component instance. */
167
+ removeListener(
168
+ eventName: PropertyKey,
169
+ listener: (...args: any[]) => any,
170
+ ): this;
171
+ /** Remove all listeners from the component instance. */
172
+ removeAllListeners(eventName?: PropertyKey): this;
173
+ /** Removes the component instance from the DOM and cleans up all active event handlers including all children. */
174
+ destroy(): void;
175
+ /** Schedule an update (similar to if a state had been changed). */
176
+ forceUpdate(): void;
177
+ /** Generates a unique id derived from the current unique instance id (similar to :scoped in the template). */
178
+ elId(key?: string, index?: number): string;
179
+ /** @alias elId */
180
+ getElId(key?: string, index?: number): string;
181
+ /** Gets an element reference by its `key` attribute in the template. */
182
+ getEl<T extends Element | void = Element | void>(
183
+ key?: string,
184
+ index?: number,
185
+ ): T;
186
+ /** Gets all element references by their `key` attribute in the template. */
187
+ getEls<T extends Element[] = Element[]>(key: string): T;
188
+ /** Gets a component reference by its `key` attribute in the template. */
189
+ getComponent<T extends Component | void = Component | void>(
190
+ key: string,
191
+ index?: number,
192
+ ): T;
193
+ /** Gets all component references by their `key` attribute in the template. */
194
+ getComponents<T extends Component[] = Component[]>(key: string): T;
195
+ /** True if this instance has been removed from the dom. */
196
+ /** True if this instance is scheduled to rerender. */
197
+ isDestroyed(): boolean;
198
+ /** Replace the entire state object with a new one, removing old properties. */
199
+ replaceState(state: this["state"]): void;
200
+ /**
201
+ * Update a property on this.state (should prefer mutating this.state directly).
202
+ * When passed an object as the first argument, it will be merged into the state.
203
+ */
204
+ setState<Key extends PropertyKey>(
205
+ name: Key & keyof this["state"],
206
+ value: (this["state"] & Record<PropertyKey, unknown>)[Key],
207
+ ): void;
208
+ setState(value: Partial<this["state"]>): void;
209
+
210
+ /** Schedules an update related to a specific state property and optionally updates the value. */
211
+ setStateDirty<Key extends PropertyKey>(
212
+ name: Key & keyof this["state"],
213
+ value?: (this["state"] & Record<PropertyKey, unknown>)[Key],
214
+ ): void;
215
+ /** Synchronously flush any scheduled updates. */
216
+ update(): void;
217
+ /** Appends the dom for the current instance to a parent DOM element. */
218
+ appendTo(target: ParentNode): this;
219
+ /** Inserts the dom for the current instance after a sibling DOM element. */
220
+ insertAfter(target: ChildNode): this;
221
+ /** Inserts the dom for the current instance before a sibling DOM element. */
222
+ insertBefore(target: ChildNode): this;
223
+ /** Prepends the dom for the current instance to a parent DOM element. */
224
+ prependTo(target: ParentNode): this;
225
+ /** Replaces an existing DOM element with the dom for the current instance. */
226
+ replace(target: ChildNode): this;
227
+ /** Replaces the children of an existing DOM element with the dom for the current instance. */
228
+ replaceChildrenOf(target: ParentNode): this;
229
+ // /** Called when the component is first created. */
230
+ // onCreate?(input: this["input"], out: Marko.Out): void;
231
+ // /** Called every time the component receives input from it's parent. */
232
+ // onInput?(input: this["input"], out: Marko.Out): void | this["input"];
233
+ // /** Called after a component has successfully rendered, but before it's update has been applied to the dom. */
234
+ // onRender?(out: Marko.Out): void;
235
+ // /** Called after the first time the component renders and is attached to the dom. */
236
+ // onMount?(): void;
237
+ // /** Called when a components render has been applied to the DOM (excluding when it is initially mounted). */
238
+ // onUpdate?(): void;
239
+ // /** Called when a component is destroyed and removed from the dom. */
240
+ // onDestroy?(): void;
241
+ }
242
+
243
+ /** The top level api for a Marko Template. */
244
+ export abstract class Template<Input = unknown, Return = unknown> {
245
+ /** Creates a Marko compatible output stream. */
246
+ createOut(): Out;
247
+
248
+ /**
249
+ * The following types are processed up by the @marko/language-tools
250
+ * and inlined into the compiled template.
251
+ *
252
+ * This is done to support generics on each of these methods
253
+ * until TypeScript supports higher kinded types.
254
+ *
255
+ * https://github.com/microsoft/TypeScript/issues/1213
256
+ */
257
+
258
+ /** @marko-overload-start */
259
+ /** Asynchronously render the template. */
260
+ abstract render(
261
+ input: Marko.TemplateInput<Input>,
262
+ stream?: {
263
+ write: (chunk: string) => void;
264
+ end: (chunk?: string) => void;
265
+ },
266
+ ): Marko.Out<Marko.Component>;
267
+
268
+ /** Asynchronously render the template in buffered mode. */
269
+ abstract render(
270
+ input: Marko.TemplateInput<Input>,
271
+ cb?: (
272
+ err: Error | null,
273
+ result: Marko.RenderResult<Marko.Component>,
274
+ ) => void,
275
+ ): Marko.Out<Marko.Component>;
276
+
277
+ /** Synchronously render the template. */
278
+ abstract renderSync(
279
+ input: Marko.TemplateInput<Input>,
280
+ ): Marko.RenderResult<Marko.Component>;
281
+
282
+ /** Synchronously render a template to a string. */
283
+ abstract renderToString(input: Marko.TemplateInput<Input>): string;
284
+
285
+ /** Render a template and return a stream.Readable in nodejs or a ReadableStream in a web worker environment. */
286
+ abstract stream(
287
+ input: Marko.TemplateInput<Input>,
288
+ ): ReadableStream<string> & NodeJS.ReadableStream;
289
+
290
+ /** Render and attach the template to a DOM node. */
291
+ abstract mount(
292
+ input: Marko.TemplateInput<Input>,
293
+ reference: Node,
294
+ position?: "afterbegin" | "afterend" | "beforebegin" | "beforeend",
295
+ ): Marko.MountedTemplate<typeof input>;
296
+ /** @marko-overload-end */
297
+ }
298
+
299
+ export interface RenderResult<
300
+ out Component extends Marko.Component = Marko.Component,
301
+ > {
302
+ /** Returns the component created as a result of rendering the template. */
303
+ getComponent(): Component;
304
+ getComponents(selector?: any): any;
305
+ /** Triggers the mount lifecycle of a component without necessarily attaching it to the DOM. */
306
+ afterInsert(host?: any): this;
307
+ /** Gets the DOM node rendered by a template. */
308
+ getNode(host?: any): Node;
309
+ /** Gets the HTML output of the rendered template. */
310
+ toString(): string;
311
+ /** Appends the dom of the rendered template to a parent DOM element. */
312
+ appendTo(target: ParentNode): this;
313
+ /** Inserts the dom of the rendered template after a sibling DOM element. */
314
+ insertAfter(target: ChildNode): this;
315
+ /** Inserts the dom of the rendered template before a sibling DOM element. */
316
+ insertBefore(target: ChildNode): this;
317
+ /** Prepends the dom of the rendered template to a parent DOM element. */
318
+ prependTo(target: ParentNode): this;
319
+ /** Replaces an existing DOM element with the dom of the rendered template. */
320
+ replace(target: ChildNode): this;
321
+ /** Replaces the children of an existing DOM element with the dom of the rendered template. */
322
+ replaceChildrenOf(target: ParentNode): this;
323
+ out: Out<Component>;
324
+ /** @deprecated */
325
+ document: any;
326
+ /** @deprecated */
327
+ getOutput(): string;
328
+ /** @deprecated */
329
+ html: string;
330
+ /** @deprecated */
331
+ context: Out<Component>;
332
+ }
333
+
334
+ export interface Emitter {
335
+ listenerCount(eventName: PropertyKey): number;
336
+ emit(eventName: PropertyKey, ...args: any[]): boolean;
337
+ on(eventName: PropertyKey, listener: (...args: any[]) => any): this;
338
+ once(eventName: PropertyKey, listener: (...args: any[]) => any): this;
339
+ prependListener(
340
+ eventName: PropertyKey,
341
+ listener: (...args: any[]) => any,
342
+ ): this;
343
+ removeListener(
344
+ eventName: PropertyKey,
345
+ listener: (...args: any[]) => any,
346
+ ): this;
347
+ removeAllListeners(eventName?: PropertyKey): this;
348
+ }
349
+
350
+ export type AttrTag<T> = T & {
351
+ [Symbol.iterator](): Iterator<T>;
352
+ };
353
+
354
+ export interface NativeTag<
355
+ Input extends Record<string, any>,
356
+ Return extends Element,
357
+ > {
358
+ input: Input;
359
+ return: { value: () => Return };
360
+ }
361
+ export interface NativeTags {
362
+ [name: string]: NativeTag<Record<string, any>, Element>;
363
+ }
364
+
365
+ export type Input<Name> = 0 extends 1 & Name
366
+ ? any
367
+ : Name extends string
368
+ ? Name extends keyof NativeTags
369
+ ? NativeTags[Name]["input"]
370
+ : Record<string, unknown>
371
+ : Name extends
372
+ | Template<infer Input, any>
373
+ | { _(): () => (input: infer Input) => any }
374
+ ? Input
375
+ : Name extends Body<infer Args, any>
376
+ ? Args extends {
377
+ length: infer Length;
378
+ }
379
+ ? number extends Length
380
+ ? Args[0] | undefined
381
+ : 0 extends Length
382
+ ? undefined
383
+ : Args[0]
384
+ : never
385
+ : never;
386
+
387
+ export type Return<Name> = 0 extends 1 & Name
388
+ ? any
389
+ : Name extends string
390
+ ? Name extends keyof NativeTags
391
+ ? NativeTags[Name]["return"]
392
+ : () => Element
393
+ : Name extends
394
+ | { _(): () => (input: any) => { return: infer Return } }
395
+ | Template<any, infer Return>
396
+ | Body<any, infer Return>
397
+ ? Return
398
+ : never;
399
+
400
+ /** @deprecated @see {@link Marko.AttrTag} */
401
+ export type RepeatableAttrTag<T> = AttrTag<T>;
402
+
403
+ /** @deprecated @see {@link Marko.Input} */
404
+ export type NativeTagInput<Name extends keyof NativeTags> =
405
+ NativeTags[Name]["input"];
406
+ /** @deprecated @see {@link Marko.Return} */
407
+ export type NativeTagReturn<Name extends keyof NativeTags> =
408
+ NativeTags[Name]["return"];
409
+ }
410
+ }
package/package.json CHANGED
@@ -1 +1,35 @@
1
- {"name":"@marko/ts-plugin","version":"0.0.0","private":false}
1
+ {
2
+ "name": "@marko/ts-plugin",
3
+ "version": "3.1.0",
4
+ "description": "TypeScript Server plugin that resolves Marko (.marko) imports with types inside TypeScript files",
5
+ "keywords": [
6
+ "marko",
7
+ "typescript",
8
+ "tsserver",
9
+ "plugin",
10
+ "tools"
11
+ ],
12
+ "homepage": "https://github.com/marko-js/language-server/tree/main/packages/ts-plugin/README.md",
13
+ "bugs": "https://github.com/marko-js/language-server/issues/new?template=bug-report.yml",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "https://github.com/marko-js/language-server/tree/main/packages/ts-plugin"
17
+ },
18
+ "license": "MIT",
19
+ "main": "dist/index.js",
20
+ "files": [
21
+ "dist",
22
+ "!**/__tests__",
23
+ "!**/*.tsbuildinfo"
24
+ ],
25
+ "scripts": {
26
+ "build": "tsx build.mts"
27
+ },
28
+ "devDependencies": {
29
+ "@marko/language-server": "^3.0.1",
30
+ "@marko/language-tools": "^2.5.59",
31
+ "marko": "^5.38.36",
32
+ "tsx": "^4.21.0",
33
+ "typescript": "^6.0.3"
34
+ }
35
+ }