{"ast":null,"code":"import { TokenType as tt } from \"../parser/tokenizer/types\";\n\n/**\n * Common method sharing code between CJS and ESM cases, since they're the same here.\n */\nexport default function shouldElideDefaultExport(isTypeScriptTransformEnabled, keepUnusedImports, tokens, declarationInfo) {\n  if (!isTypeScriptTransformEnabled || keepUnusedImports) {\n    return false;\n  }\n  const exportToken = tokens.currentToken();\n  if (exportToken.rhsEndIndex == null) {\n    throw new Error(\"Expected non-null rhsEndIndex on export token.\");\n  }\n  // The export must be of the form `export default a` or `export default a;`.\n  const numTokens = exportToken.rhsEndIndex - tokens.currentIndex();\n  if (numTokens !== 3 && !(numTokens === 4 && tokens.matches1AtIndex(exportToken.rhsEndIndex - 1, tt.semi))) {\n    return false;\n  }\n  const identifierToken = tokens.tokenAtRelativeIndex(2);\n  if (identifierToken.type !== tt.name) {\n    return false;\n  }\n  const exportedName = tokens.identifierNameForToken(identifierToken);\n  return declarationInfo.typeDeclarations.has(exportedName) && !declarationInfo.valueDeclarations.has(exportedName);\n}","map":{"version":3,"names":["TokenType","tt","shouldElideDefaultExport","isTypeScriptTransformEnabled","keepUnusedImports","tokens","declarationInfo","exportToken","currentToken","rhsEndIndex","Error","numTokens","currentIndex","matches1AtIndex","semi","identifierToken","tokenAtRelativeIndex","type","name","exportedName","identifierNameForToken","typeDeclarations","has","valueDeclarations"],"sources":["C:/Users/user/Desktop/000newport/node_modules/sucrase/dist/esm/util/shouldElideDefaultExport.js"],"sourcesContent":["import {TokenType as tt} from \"../parser/tokenizer/types\";\n\n\n\n/**\n * Common method sharing code between CJS and ESM cases, since they're the same here.\n */\nexport default function shouldElideDefaultExport(\n  isTypeScriptTransformEnabled,\n  keepUnusedImports,\n  tokens,\n  declarationInfo,\n) {\n  if (!isTypeScriptTransformEnabled || keepUnusedImports) {\n    return false;\n  }\n  const exportToken = tokens.currentToken();\n  if (exportToken.rhsEndIndex == null) {\n    throw new Error(\"Expected non-null rhsEndIndex on export token.\");\n  }\n  // The export must be of the form `export default a` or `export default a;`.\n  const numTokens = exportToken.rhsEndIndex - tokens.currentIndex();\n  if (\n    numTokens !== 3 &&\n    !(numTokens === 4 && tokens.matches1AtIndex(exportToken.rhsEndIndex - 1, tt.semi))\n  ) {\n    return false;\n  }\n  const identifierToken = tokens.tokenAtRelativeIndex(2);\n  if (identifierToken.type !== tt.name) {\n    return false;\n  }\n  const exportedName = tokens.identifierNameForToken(identifierToken);\n  return (\n    declarationInfo.typeDeclarations.has(exportedName) &&\n    !declarationInfo.valueDeclarations.has(exportedName)\n  );\n}\n"],"mappings":"AAAA,SAAQA,SAAS,IAAIC,EAAE,QAAO,2BAA2B;;AAIzD;AACA;AACA;AACA,eAAe,SAASC,wBAAwBA,CAC9CC,4BAA4B,EAC5BC,iBAAiB,EACjBC,MAAM,EACNC,eAAe,EACf;EACA,IAAI,CAACH,4BAA4B,IAAIC,iBAAiB,EAAE;IACtD,OAAO,KAAK;EACd;EACA,MAAMG,WAAW,GAAGF,MAAM,CAACG,YAAY,CAAC,CAAC;EACzC,IAAID,WAAW,CAACE,WAAW,IAAI,IAAI,EAAE;IACnC,MAAM,IAAIC,KAAK,CAAC,gDAAgD,CAAC;EACnE;EACA;EACA,MAAMC,SAAS,GAAGJ,WAAW,CAACE,WAAW,GAAGJ,MAAM,CAACO,YAAY,CAAC,CAAC;EACjE,IACED,SAAS,KAAK,CAAC,IACf,EAAEA,SAAS,KAAK,CAAC,IAAIN,MAAM,CAACQ,eAAe,CAACN,WAAW,CAACE,WAAW,GAAG,CAAC,EAAER,EAAE,CAACa,IAAI,CAAC,CAAC,EAClF;IACA,OAAO,KAAK;EACd;EACA,MAAMC,eAAe,GAAGV,MAAM,CAACW,oBAAoB,CAAC,CAAC,CAAC;EACtD,IAAID,eAAe,CAACE,IAAI,KAAKhB,EAAE,CAACiB,IAAI,EAAE;IACpC,OAAO,KAAK;EACd;EACA,MAAMC,YAAY,GAAGd,MAAM,CAACe,sBAAsB,CAACL,eAAe,CAAC;EACnE,OACET,eAAe,CAACe,gBAAgB,CAACC,GAAG,CAACH,YAAY,CAAC,IAClD,CAACb,eAAe,CAACiB,iBAAiB,CAACD,GAAG,CAACH,YAAY,CAAC;AAExD"},"metadata":{},"sourceType":"module","externalDependencies":[]}