UNPKG

eslint-plugin-jsdoc

Version:
1 lines 41.5 kB
{"version":3,"file":"noUndefinedTypes.cjs","names":["iterateJsdoc","getJSDocCommentBlocks","getDocumentNamepathDefiningTags","parseImportsExports","getJSDocComment","parseComment","tryParseType","parseType","traverse"],"sources":["../../src/rules/noUndefinedTypes.js"],"sourcesContent":["import iterateJsdoc, {\n parseComment,\n} from '../iterateJsdoc.js';\nimport {\n getDocumentNamepathDefiningTags,\n getJSDocCommentBlocks,\n} from '../jsdocUtils.js';\nimport {\n getJSDocComment,\n parse as parseType,\n traverse,\n tryParse as tryParseType,\n} from '@es-joy/jsdoccomment';\nimport {\n parseImportsExports,\n} from 'parse-imports-exports';\n\nconst extraTypes = [\n 'null', 'undefined', 'void', 'string', 'boolean', 'object',\n 'function', 'symbol',\n 'number', 'bigint', 'NaN', 'Infinity',\n 'any', '*', 'never', 'unknown', 'const',\n 'this', 'true', 'false',\n 'Array', 'Object', 'RegExp', 'Date', 'Function', 'Intl',\n];\n\nconst globalTypes = [\n 'globalThis', 'global', 'window', 'self',\n];\n\nconst iterableIterator = [\n 'Iterable',\n 'Iterator',\n 'IteratorObject',\n];\n\nconst typescriptGlobals = [\n ...iterableIterator,\n\n // https://www.typescriptlang.org/docs/handbook/utility-types.html\n 'Awaited',\n 'Partial',\n 'Required',\n 'Readonly',\n 'Record',\n 'Pick',\n 'Omit',\n 'Exclude',\n 'Extract',\n 'NonNullable',\n 'Parameters',\n 'ConstructorParameters',\n 'ReturnType',\n 'InstanceType',\n 'ThisParameterType',\n 'OmitThisParameter',\n 'ThisType',\n 'Uppercase',\n 'Lowercase',\n 'Capitalize',\n 'Uncapitalize',\n];\n\n/**\n * @param {string|false|undefined} [str]\n * @returns {undefined|string|false}\n */\nconst stripPseudoTypes = (str) => {\n return str && str.replace(/(?:\\.|<>|\\.<>|\\[\\])$/v, '');\n};\n\nexport default iterateJsdoc(({\n context,\n node,\n report,\n settings,\n sourceCode,\n state,\n utils,\n}) => {\n /** @type {string[]} */\n const foundTypedefValues = [];\n\n const {\n scopeManager,\n } = sourceCode;\n\n // When is this ever `null`?\n const globalScope = /** @type {import('eslint').Scope.Scope} */ (\n scopeManager.globalScope\n );\n\n const\n /**\n * @type {{\n * checkUsedTypedefs: boolean\n * definedTypes: string[],\n * disableReporting: boolean,\n * markVariablesAsUsed: boolean,\n * }}\n */ {\n checkUsedTypedefs = false,\n definedTypes = [],\n disableReporting = false,\n markVariablesAsUsed = true,\n } = context.options[0] || {};\n\n /** @type {(string|undefined)[]} */\n let definedPreferredTypes = [];\n const {\n mode,\n preferredTypes,\n structuredTags,\n } = settings;\n if (Object.keys(preferredTypes).length) {\n definedPreferredTypes = /** @type {string[]} */ (Object.values(preferredTypes).map((preferredType) => {\n if (typeof preferredType === 'string') {\n // May become an empty string but will be filtered out below\n return stripPseudoTypes(preferredType);\n }\n\n if (!preferredType) {\n return undefined;\n }\n\n if (typeof preferredType !== 'object') {\n utils.reportSettings(\n 'Invalid `settings.jsdoc.preferredTypes`. Values must be falsy, a string, or an object.',\n );\n }\n\n return stripPseudoTypes(preferredType.replacement);\n })\n .filter(Boolean));\n }\n\n const allComments = sourceCode.getAllComments();\n const comments = getJSDocCommentBlocks(sourceCode);\n\n const globals = allComments\n .filter((comment) => {\n return (/^\\s*globals/v).test(comment.value);\n }).flatMap((commentNode) => {\n return commentNode.value.replace(/^\\s*globals/v, '').trim().split(/,\\s*/v);\n }).concat(Object.keys(context.languageOptions.globals ?? []));\n\n const typedefs = getDocumentNamepathDefiningTags(sourceCode);\n\n const typedefDeclarations = typedefs\n .map((tag) => {\n return tag.name;\n });\n\n const importTags = settings.mode === 'typescript' ? /** @type {string[]} */ (comments.flatMap((doc) => {\n return doc.tags.filter(({\n tag,\n }) => {\n return tag === 'import';\n });\n }).flatMap((tag) => {\n const {\n description,\n name,\n type,\n } = tag;\n const typePart = type ? `{${type}} ` : '';\n const imprt = 'import ' + (description ?\n `${typePart}${name} ${description}` :\n `${typePart}${name}`);\n\n const importsExports = parseImportsExports(imprt.trim());\n\n const types = [];\n const namedImports = Object.values(importsExports.namedImports || {})[0]?.[0];\n if (namedImports) {\n if (namedImports.default) {\n types.push(namedImports.default);\n }\n\n if (namedImports.names) {\n types.push(...Object.keys(namedImports.names));\n }\n }\n\n const namespaceImports = Object.values(importsExports.namespaceImports || {})[0]?.[0];\n if (namespaceImports) {\n if (namespaceImports.namespace) {\n types.push(namespaceImports.namespace);\n }\n\n if (namespaceImports.default) {\n types.push(namespaceImports.default);\n }\n }\n\n return types;\n }).filter(Boolean)) : [];\n\n const ancestorNodes = [];\n\n let currentNode = node;\n // No need for Program node?\n while (currentNode?.parent) {\n ancestorNodes.push(currentNode);\n currentNode = currentNode.parent;\n }\n\n /**\n * @param {import('eslint').Rule.Node} ancestorNode\n * @returns {import('comment-parser').Spec[]}\n */\n const getTemplateTags = function (ancestorNode) {\n const commentNode = getJSDocComment(sourceCode, ancestorNode, settings);\n if (!commentNode) {\n return [];\n }\n\n const jsdc = parseComment(commentNode, '');\n\n return jsdc.tags.filter((tag) => {\n return tag.tag === 'template';\n });\n };\n\n // `currentScope` may be `null` or `Program`, so in such a case,\n // we look to present tags instead\n const templateTags = ancestorNodes.length ?\n ancestorNodes.flatMap((ancestorNode) => {\n return getTemplateTags(ancestorNode);\n }) :\n // We err on the side of being too aggressive; checking only\n // present tags is not sufficient\n comments.flatMap((doc) => {\n return doc.tags.filter(({\n tag,\n }) => {\n return tag === 'template';\n });\n });\n\n const closureGenericTypes = templateTags.flatMap((tag) => {\n return utils.parseClosureTemplateTag(tag);\n });\n\n // In modules, including Node, there is a global scope at top with the\n // Program scope inside\n const cjsOrESMScope = globalScope.childScopes[0]?.block?.type === 'Program';\n\n /**\n * @param {import(\"eslint\").Scope.Scope | null} scope\n * @returns {Set<string>}\n */\n const getValidRuntimeIdentifiers = (scope) => {\n const result = new Set();\n\n let scp = scope;\n\n /**\n * @param {import(\"eslint\").Scope.Scope | null} sc\n */\n const getChildScopes = (sc) => {\n if (sc) {\n // We must check child scopes because when multiple nodes find\n // the same comment block, only one node is reported by our code,\n // and it can be the children which are not reported.\n for (const childScope of sc.childScopes) {\n for (const {\n name,\n } of childScope.variables) {\n result.add(name);\n }\n\n for (const grandChildScope of childScope.childScopes) {\n getChildScopes(grandChildScope);\n }\n }\n }\n };\n\n getChildScopes(scp);\n\n while (scp) {\n for (const {\n name,\n } of scp.variables) {\n result.add(name);\n }\n\n scp = scp.upper;\n }\n\n return result;\n };\n\n /**\n * Recursively extracts types from a namespace declaration.\n * @param {string} prefix - The namespace prefix (e.g., \"MyNamespace\" or \"Outer.Inner\").\n * @param {import('@typescript-eslint/types').TSESTree.TSModuleDeclaration} moduleDeclaration - The module declaration node.\n * @returns {string[]} Array of fully qualified type names.\n */\n const getNamespaceTypes = (prefix, moduleDeclaration) => {\n /* c8 ignore next 3 -- Guard for ambient modules without body. */\n if (!moduleDeclaration.body || moduleDeclaration.body.type !== 'TSModuleBlock') {\n return [];\n }\n\n return moduleDeclaration.body.body.flatMap((item) => {\n /** @type {import('@typescript-eslint/types').TSESTree.ProgramStatement | import('@typescript-eslint/types').TSESTree.NamedExportDeclarations | null} */\n let declaration = item;\n\n if (item.type === 'ExportNamedDeclaration' && item.declaration) {\n declaration = item.declaration;\n }\n\n if (declaration.type === 'TSTypeAliasDeclaration' || declaration.type === 'ClassDeclaration') {\n /* c8 ignore next 4 -- Guard for anonymous class declarations. */\n if (!declaration.id) {\n return [];\n }\n\n return [\n `${prefix}.${declaration.id.name}`,\n ];\n }\n\n if (declaration.type === 'TSInterfaceDeclaration') {\n return [\n `${prefix}.${declaration.id.name}`,\n ...declaration.body.body.map((prop) => {\n // Only `TSPropertySignature` and `TSMethodSignature` have 'key'.\n if (prop.type !== 'TSPropertySignature' && prop.type !== 'TSMethodSignature') {\n return '';\n }\n\n // Key can be computed or a literal, only handle Identifier.\n if (prop.key.type !== 'Identifier') {\n return '';\n }\n\n const propName = prop.key.name;\n /* c8 ignore next -- `propName` is always truthy for Identifiers. */\n return propName ? `${prefix}.${declaration.id.name}.${propName}` : '';\n }).filter(Boolean),\n ];\n }\n\n // Handle nested namespaces.\n if (declaration.type === 'TSModuleDeclaration') {\n /* c8 ignore next -- Nested string-literal modules aren't valid TS syntax. */\n const nestedName = declaration.id?.type === 'Identifier' ? declaration.id.name : '';\n /* c8 ignore next 3 -- Guard. */\n if (!nestedName) {\n return [];\n }\n\n return [\n `${prefix}.${nestedName}`,\n ...getNamespaceTypes(`${prefix}.${nestedName}`, declaration),\n ];\n }\n\n // Fallback for unhandled declaration types (e.g., TSEnumDeclaration, FunctionDeclaration, etc.).\n return [];\n });\n };\n\n /**\n * We treat imports differently as we can't introspect their children.\n * @type {string[]}\n */\n const imports = [];\n\n /** @type {Set<string>} */\n const closedTypes = new Set();\n\n const tsModuleVariables = scopeManager.scopes.filter(({\n type,\n }) => {\n // @ts-expect-error TS\n return type === 'tsModule';\n }).flatMap(({\n variables,\n }) => {\n return variables.map(({\n name,\n }) => {\n return name;\n });\n });\n\n const allDefinedTypes = new Set(globalScope.variables.map(({\n name,\n }) => {\n return name;\n })\n\n // If the file is a module, concat the variables from the module scope.\n .concat(\n cjsOrESMScope ?\n globalScope.childScopes.flatMap(({\n variables,\n }) => {\n return variables;\n }).flatMap(({\n identifiers,\n name,\n }) => {\n const globalItem = /** @type {import('estree').Identifier & {parent: import('@typescript-eslint/types').TSESTree.Node}} */ (\n identifiers?.[0]\n )?.parent;\n switch (globalItem?.type) {\n case 'ClassDeclaration':\n closedTypes.add(name);\n return [\n name,\n ...globalItem.body.body.map((item) => {\n const property = /** @type {import('@typescript-eslint/types').TSESTree.Identifier} */ (\n /** @type {import('@typescript-eslint/types').TSESTree.PropertyDefinition} */ (\n item)?.key)?.name;\n /* c8 ignore next 3 -- Guard */\n if (!property) {\n return '';\n }\n\n return `${name}.${property}`;\n }).filter(Boolean),\n ];\n case 'ImportDefaultSpecifier':\n case 'ImportNamespaceSpecifier':\n case 'ImportSpecifier':\n imports.push(name);\n break;\n case 'TSInterfaceDeclaration':\n return [\n name,\n ...globalItem.body.body.map((item) => {\n const property = /** @type {import('@typescript-eslint/types').TSESTree.Identifier} */ (\n /** @type {import('@typescript-eslint/types').TSESTree.TSPropertySignature} */ (\n item)?.key)?.name;\n /* c8 ignore next 3 -- Guard */\n if (!property) {\n return '';\n }\n\n return `${name}.${property}`;\n }).filter(Boolean),\n ];\n case 'TSModuleDeclaration':\n closedTypes.add(name);\n return [\n name,\n ...getNamespaceTypes(name, globalItem),\n ];\n case 'VariableDeclarator':\n if (/** @type {import('@typescript-eslint/types').TSESTree.Identifier} */ (\n /** @type {import('@typescript-eslint/types').TSESTree.CallExpression} */ (\n globalItem?.init\n )?.callee)?.name === 'require'\n ) {\n imports.push(/** @type {import('@typescript-eslint/types').TSESTree.Identifier} */ (\n globalItem.id\n ).name);\n break;\n }\n\n // Module scope names are also defined\n return [\n name,\n ];\n }\n\n return [\n name,\n ];\n /* c8 ignore next */\n }) : [],\n )\n .concat(extraTypes)\n .concat(typedefDeclarations)\n .concat(importTags)\n .concat(definedTypes)\n .concat(tsModuleVariables)\n .concat(/** @type {string[]} */ (definedPreferredTypes))\n .concat((() => {\n // Other methods are not in scope, but we need them, and we grab them here\n if (node?.type === 'MethodDefinition') {\n return /** @type {import('estree').ClassBody} */ (node.parent).body.flatMap((methodOrProp) => {\n if (methodOrProp.type === 'MethodDefinition') {\n // eslint-disable-next-line unicorn/no-lonely-if -- Pattern\n if (methodOrProp.key.type === 'Identifier') {\n return [\n methodOrProp.key.name,\n `${/** @type {import('estree').ClassDeclaration} */ (\n node.parent?.parent\n )?.id?.name}.${methodOrProp.key.name}`,\n ];\n }\n }\n\n if (methodOrProp.type === 'PropertyDefinition') {\n // eslint-disable-next-line unicorn/no-lonely-if -- Pattern\n if (methodOrProp.key.type === 'Identifier') {\n return [\n methodOrProp.key.name,\n `${/** @type {import('estree').ClassDeclaration} */ (\n node.parent?.parent\n )?.id?.name}.${methodOrProp.key.name}`,\n ];\n }\n }\n /* c8 ignore next 2 -- Not yet built */\n\n return '';\n }).filter(Boolean);\n }\n\n return [];\n })())\n .concat((() => {\n // Detect static property assignments like `MyClass.Prop = ...`\n const programBody = /** @type {import('@typescript-eslint/types').TSESTree.Program} */ (\n sourceCode.ast\n ).body;\n\n return programBody.flatMap((statement) => {\n if (\n statement.type === 'ExpressionStatement' &&\n statement.expression.type === 'AssignmentExpression' &&\n statement.expression.left.type === 'MemberExpression' &&\n statement.expression.left.object.type === 'Identifier' &&\n statement.expression.left.property.type === 'Identifier' &&\n closedTypes.has(statement.expression.left.object.name)\n ) {\n return [\n `${statement.expression.left.object.name}.${statement.expression.left.property.name}`,\n ];\n }\n\n return [];\n });\n })())\n .concat(...getValidRuntimeIdentifiers(node && (\n (sourceCode.getScope &&\n /* c8 ignore next 3 */\n sourceCode.getScope(node)) ||\n // @ts-expect-error ESLint 8\n context.getScope()\n )))\n .concat(\n settings.mode === 'jsdoc' ?\n [] :\n [\n ...settings.mode === 'typescript' ? typescriptGlobals : [],\n ...closureGenericTypes,\n ],\n ));\n\n /**\n * @typedef {{\n * parsedType: import('jsdoc-type-pratt-parser').RootResult;\n * tag: import('comment-parser').Spec|import('@es-joy/jsdoccomment').JsdocInlineTagNoType & {\n * line?: import('../iterateJsdoc.js').Integer\n * }\n * }} TypeAndTagInfo\n */\n\n /**\n * @param {string} propertyName\n * @returns {(tag: (import('@es-joy/jsdoccomment').JsdocInlineTagNoType & {\n * name?: string,\n * type?: string,\n * line?: import('../iterateJsdoc.js').Integer\n * })|import('comment-parser').Spec & {\n * namepathOrURL?: string\n * }\n * ) => undefined|TypeAndTagInfo}\n */\n const tagToParsedType = (propertyName) => {\n return (tag) => {\n try {\n const potentialType = tag[\n /** @type {\"type\"|\"name\"|\"namepathOrURL\"} */ (propertyName)\n ];\n return {\n parsedType: mode === 'permissive' ?\n tryParseType(/** @type {string} */ (potentialType)) :\n parseType(/** @type {string} */ (potentialType), mode),\n tag,\n };\n } catch {\n return undefined;\n }\n };\n };\n\n const typeTags = utils.filterTags(({\n tag,\n }) => {\n return tag !== 'import' && utils.tagMightHaveTypePosition(tag) && (tag !== 'suppress' || settings.mode !== 'closure');\n }).map(tagToParsedType('type'));\n\n const namepathReferencingTags = utils.filterTags(({\n tag,\n }) => {\n return utils.isNamepathReferencingTag(tag);\n }).map(tagToParsedType('name'));\n\n const namepathOrUrlReferencingTags = utils.filterAllTags(({\n tag,\n }) => {\n return utils.isNamepathOrUrlReferencingTag(tag);\n }).map(tagToParsedType('namepathOrURL'));\n\n const definedNamesAndNamepaths = new Set(utils.filterTags(({\n tag,\n }) => {\n return utils.isNameOrNamepathDefiningTag(tag);\n }).map(({\n name,\n }) => {\n return name;\n }));\n\n const tagsWithTypes = /** @type {TypeAndTagInfo[]} */ ([\n ...typeTags,\n ...namepathReferencingTags,\n ...namepathOrUrlReferencingTags,\n // Remove types which failed to parse\n ].filter(Boolean));\n\n for (const {\n parsedType,\n tag,\n } of tagsWithTypes) {\n // eslint-disable-next-line complexity -- Refactor\n traverse(parsedType, (nde, parentNode) => {\n /**\n * @type {import('jsdoc-type-pratt-parser').NameResult & {\n * _parent?: import('jsdoc-type-pratt-parser').NonRootResult\n * }}\n */\n // eslint-disable-next-line canonical/id-match -- Avoid clashes\n (nde)._parent = parentNode;\n const {\n type,\n value,\n } = /** @type {import('jsdoc-type-pratt-parser').NameResult} */ (nde);\n\n let val = value;\n\n /** @type {import('jsdoc-type-pratt-parser').NonRootResult|undefined} */\n let currNode = nde;\n do {\n currNode =\n /**\n * @type {import('jsdoc-type-pratt-parser').NameResult & {\n * _parent?: import('jsdoc-type-pratt-parser').NonRootResult\n * }}\n */ (currNode)._parent;\n if (\n // Avoid appending for imports and globals since we don't want to\n // check their properties which may or may not exist\n !imports.includes(val) && !globals.includes(val) &&\n !importTags.includes(val) &&\n !extraTypes.includes(val) &&\n !typedefDeclarations.includes(val) &&\n !globalTypes.includes(val) &&\n currNode && 'right' in currNode &&\n currNode.right?.type === 'JsdocTypeProperty'\n ) {\n val = val + '.' + currNode.right.value;\n }\n } while (currNode?.type === 'JsdocTypeNamePath');\n\n if (type === 'JsdocTypeName') {\n const structuredTypes = structuredTags[tag.tag]?.type;\n const rootNamespace = val.split('.')[0];\n const isNamespaceValid = (definedTypes.includes(rootNamespace) || allDefinedTypes.has(rootNamespace)) &&\n !closedTypes.has(rootNamespace);\n\n if (!allDefinedTypes.has(val) &&\n !definedNamesAndNamepaths.has(val) &&\n (!Array.isArray(structuredTypes) || !structuredTypes.includes(val)) && !isNamespaceValid\n ) {\n const parent =\n /**\n * @type {import('jsdoc-type-pratt-parser').RootResult & {\n * _parent?: import('jsdoc-type-pratt-parser').NonRootResult\n * }}\n */ (nde)._parent;\n if (parent?.type === 'JsdocTypeTypeParameter') {\n return;\n }\n\n if (parent?.type === 'JsdocTypeFunction' &&\n /** @type {import('jsdoc-type-pratt-parser').FunctionResult} */\n (parent)?.typeParameters?.some((typeParam) => {\n return value === typeParam.name.value;\n })\n ) {\n return;\n }\n\n if (parent?.type === 'JsdocTypeInfer' && value === parent.element.value) {\n allDefinedTypes.add(value);\n return;\n }\n\n if (!disableReporting) {\n report(`The type '${val}' is undefined.`, null, tag);\n }\n } else if (markVariablesAsUsed && !extraTypes.includes(val)) {\n if (sourceCode.markVariableAsUsed) {\n sourceCode.markVariableAsUsed(val);\n /* c8 ignore next 4 */\n } else {\n // @ts-expect-error ESLint 8\n context.markVariableAsUsed(val);\n }\n }\n\n if (checkUsedTypedefs && typedefDeclarations.includes(val)) {\n foundTypedefValues.push(val);\n }\n }\n });\n }\n\n state.foundTypedefValues = foundTypedefValues;\n}, {\n // We use this method rather than checking at end of handler above because\n // in that case, it is invoked too many times and would thus report errors\n // too many times.\n exit ({\n context,\n state,\n utils,\n }) {\n const {\n checkUsedTypedefs = false,\n } = context.options[0] || {};\n\n if (!checkUsedTypedefs) {\n return;\n }\n\n const allComments = context.sourceCode.getAllComments();\n const comments = allComments\n .filter((comment) => {\n return (/^\\*(?!\\*)/v).test(comment.value);\n })\n .map((commentNode) => {\n return {\n doc: parseComment(commentNode, ''),\n loc: commentNode.loc,\n };\n });\n const typedefs = comments\n .flatMap(({\n doc,\n loc,\n }) => {\n const tags = doc.tags.filter(({\n tag,\n }) => {\n return utils.isNameOrNamepathDefiningTag(tag);\n });\n if (!tags.length) {\n return [];\n }\n\n return {\n loc,\n tags,\n };\n });\n\n for (const typedef of typedefs) {\n if (\n !state.foundTypedefValues.includes(typedef.tags[0].name)\n ) {\n context.report({\n loc: /** @type {import('@eslint/core').SourceLocation} */ (typedef.loc),\n message: 'This typedef was not used within the file',\n });\n }\n }\n },\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Besides some expected built-in types, prohibits any types not specified as globals or within `@typedef`.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-undefined-types.md#repos-sticky-header',\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n checkUsedTypedefs: {\n description: 'Whether to check typedefs for use within the file',\n type: 'boolean',\n },\n definedTypes: {\n description: `This array can be populated to indicate other types which\nare automatically considered as defined (in addition to globals, etc.).\nDefaults to an empty array.`,\n items: {\n type: 'string',\n },\n type: 'array',\n },\n disableReporting: {\n description: `Whether to disable reporting of errors. Defaults to\n\\`false\\`. This may be set to \\`true\\` in order to take advantage of only\nmarking defined variables as used or checking used typedefs.`,\n type: 'boolean',\n },\n markVariablesAsUsed: {\n description: `Whether to mark variables as used for the purposes\nof the \\`no-unused-vars\\` rule when they are not found to be undefined.\nDefaults to \\`true\\`. May be set to \\`false\\` to enforce a practice of not\nimporting types unless used in code.`,\n type: 'boolean',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA;AAGA;AAIA;AAMA;AAE+B;AAE/B,MAAM,UAAU,GAAG,CACjB,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAC1D,UAAU,EAAE,QAAQ,EACpB,QAAQ,EAAE,QA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