Skip to content

Commit e102ca4

Browse files
Copilothotlong
andcommitted
fix: use ReadonlySet<string> for TARGET_REQUIRED_TYPES to fix DTS build error
The Set narrowed type Exclude<ActionType, 'script'> was incompatible with Set.has() receiving the full ActionType union in strict TypeScript DTS emit. Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent c4150d9 commit e102ca4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/spec/src/ui/action.zod.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ export const ActionType = z.enum(['script', 'url', 'modal', 'flow', 'api']);
2828
* These types reference an external resource (URL, flow, modal, or API endpoint)
2929
* and cannot function without a target binding.
3030
*/
31-
const TARGET_REQUIRED_TYPES = new Set(
32-
ActionType.options.filter((t): t is Exclude<typeof t, 'script'> => t !== 'script'),
31+
const TARGET_REQUIRED_TYPES: ReadonlySet<string> = new Set(
32+
ActionType.options.filter((t) => t !== 'script'),
3333
);
3434

3535
/**

0 commit comments

Comments
 (0)