sveld 0.23.0 → 0.23.1

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.
@@ -73,6 +73,10 @@ function getContextDefs(def) {
73
73
  })
74
74
  .join("\n ");
75
75
  const contextComment = context.description ? `/**\n * ${context.description}\n */\n` : "";
76
+ // Use Record<string, never> for empty context objects instead of {}
77
+ if (context.properties.length === 0) {
78
+ return `${contextComment}export type ${context.typeName} = Record<string, never>;`;
79
+ }
76
80
  return `${contextComment}export type ${context.typeName} = {\n ${props}\n};`;
77
81
  })
78
82
  .join("\n\n");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sveld",
3
- "version": "0.23.0",
3
+ "version": "0.23.1",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Generate TypeScript definitions for your Svelte components.",
6
6
  "main": "./lib/index.js",