From 99587fbd825339c385756b2df956c6d987fb9459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Garc=C3=ADa?= <82288753+juank1809@users.noreply.github.com> Date: Mon, 8 Aug 2022 07:20:02 -0500 Subject: [PATCH] add a better typed to the unbound indexer --- packages/types/src/parser-options.ts | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/packages/types/src/parser-options.ts b/packages/types/src/parser-options.ts index dbd9e4eaf35..d8ddd689c4e 100644 --- a/packages/types/src/parser-options.ts +++ b/packages/types/src/parser-options.ts @@ -25,26 +25,6 @@ type EcmaVersion = type SourceType = 'script' | 'module'; -type ecmaFeatures = - | { - globalReturn?: boolean | undefined; - jsx?: boolean | undefined; - } - | undefined; - -type ParserOptionsValue = - | ecmaFeatures - | EcmaVersion - | Program - | SourceType - | boolean - | string - | string[] - | (string | RegExp)[] - | null - | undefined - | DebugLevel; - interface ParserOptions { ecmaFeatures?: { globalReturn?: boolean; @@ -78,7 +58,7 @@ interface ParserOptions { tsconfigRootDir?: string; warnOnUnsupportedTypeScriptVersion?: boolean; moduleResolver?: string; - [additionalProperties: string]: ParserOptionsValue | undefined; + [additionalProperties: string]: unknown } export { DebugLevel, EcmaVersion, ParserOptions, SourceType };