diff --git a/.changeset/modern-moose-fold.md b/.changeset/modern-moose-fold.md new file mode 100644 index 0000000..09ed2d8 --- /dev/null +++ b/.changeset/modern-moose-fold.md @@ -0,0 +1,5 @@ +--- +"@marko/tags-api-preview": patch +--- + +Improve get tag type by accepting an optional type parameter that specifies the returned value type diff --git a/src/components/get/index.d.marko b/src/components/get/index.d.marko index 6ce1f50..9baee2c 100644 --- a/src/components/get/index.d.marko +++ b/src/components/get/index.d.marko @@ -1,6 +1,6 @@ -export interface Input { +// @ts-expect-error 'VariableType' is declared but its value is never read. (It is only used to set the type of the return) +export interface Input { value: string; } -// TODO: this could be better. -return = 1 as unknown; +return = 1 as VariableType;