TS2304TS2304 — Cannot Find Name
TypeScript cannot find a variable, function, or type with the specified name in the current scope.
TypeScript 에러의 120개 에러 코드를 원인, 수정 방법, 예제와 함께 둘러보세요.
TS2304TypeScript cannot find a variable, function, or type with the specified name in the current scope.
TS2345The argument passed to a function is not compatible with the expected parameter type.
TS2339TypeScript cannot find the specified property on the given type.
TS2307TypeScript cannot find the module specified in an import or require statement.
TS2322A value of one type cannot be assigned to a variable or property of a different, incompatible type.
TS2531TypeScript warns that an expression could be null at runtime, and you are using it without checking.
TS2554The number of arguments passed to a function does not match the number of required parameters.
TS2769None of the function overload signatures match the provided arguments.
TS7006A function parameter has no type annotation and TypeScript cannot infer its type.
TS1005TypeScript expected a specific token (like a semicolon, comma, or bracket) but found something else.
TS6133A variable, import, or parameter is declared but its value is never read.
TS2365An arithmetic or comparison operator is used with incompatible types.
TS2305The specified export does not exist in the referenced module.
TS2740An object type is missing required properties that are expected by the target type.
TS18048TypeScript warns that a value could be undefined and you are using it without checking.
TS2532TypeScript warns that an object expression could be undefined at runtime.
TS2741A required property is missing from the object being assigned.
TS2551TypeScript cannot find the property but suggests a similar name that might be what you intended.
TS1002A string literal is missing its closing quote.
TS1003TypeScript expected an identifier (variable name, function name, etc.) but found something else.
TS1109TypeScript expected an expression but found a token that cannot start an expression.
TS1128TypeScript expected a declaration or statement but found an unexpected token.
TS2306The file referenced in an import statement is not recognized as a module.
TS2314A generic type was used with the wrong number of type arguments.
TS2344A type argument does not meet the constraint specified by the generic type parameter.
TS2349The expression being called is not a function or callable type.
TS2353An object literal contains a property that does not exist on the target type.
TS2355A function with a declared return type does not return a value in all code paths.
TS2366A function with a non-void return type does not have a return statement at the end.
TS2367A comparison between two values will always be false because their types have no overlap.
TS2393A function with the same name is implemented more than once.
TS2394A function overload signature is not compatible with the implementation signature.
TS2416A property in a derived class is not compatible with the same property in the base class.
TS2420A class declares that it implements an interface but does not provide all required members.
TS2451A variable declared with let or const is being redeclared in the same scope.
TS2454A variable is used before it has been assigned a value.
TS2488The type being iterated does not have a Symbol.iterator method.
TS2493You are accessing a tuple element at an index that does not exist.
TS2503TypeScript cannot find a namespace with the specified name.
TS2515A non-abstract class that extends an abstract class does not implement all abstract members.
TS2540You are trying to modify a property that is marked as readonly.
TS2555The function call has fewer arguments than the minimum required.
TS2556The function was called with more arguments than it accepts.
TS2558A generic type or function is used without providing required type arguments.
TS2565A class property with a definite assignment assertion (!) is never read.
TS2564A class property is not initialized in the constructor and has no default value.
TS2571You are trying to use a value of type unknown without first narrowing its type.
TS2578A @ts-expect-error directive is present but no error occurs on the next line.
TS2588You are trying to reassign a variable declared with const.
TS2612A property in a derived class conflicts with a getter/setter accessor in the base class.
TS2683The this keyword has an implicit any type because there is no contextual type.
TS2684The this context of a function does not match the expected this type.
TS2694The specified member does not exist in the given namespace.
TS2696A TypeScript-only feature is being used in a JavaScript file.
TS2705An async function requires a higher ECMAScript target to compile.
TS2792TypeScript cannot resolve a module subpath because the package's exports field does not allow it.
TS2300The same identifier is declared more than once in the same scope.
TS7030A function with a return type does not return a value in all possible code paths.
TS7031A destructured binding element has an implicit any type.
TS7005A variable has an implicit any type because TypeScript cannot infer its type.
TS7041The default export expression does not have a type annotation.
TS6196A parameter is declared but its value is never read within the function body.
TS18046A value of type unknown is used in a position that requires a more specific type.
TS2497A CommonJS module is being imported with named import syntax but only has a default export.
TS1259A CommonJS module requires esModuleInterop or allowSyntheticDefaultImports to be imported with default import syntax.
TS1375The await keyword is used inside a function that is not marked as async.
TS1378Top-level await can only be used when the module option is set to a supported module system.
TS2430An interface declares that it extends another interface but has incompatible properties.
TS2461A destructuring pattern expects an array type but the value is not an array.
TS2347Type arguments were provided to a function that is not generic.
TS2395Merged declarations for the same name have inconsistent export modifiers.
TS2790The delete operator requires the operand to be an optional property.
TS2739An object type is missing multiple required properties from the target type.
TS1046An await expression or other top-level construct requires the file to be a module.
TS1056Getter/setter accessors require a higher ECMAScript target version.
TS1064The Promise constructor must be called with the new keyword.
TS1068An unexpected token was found inside a declaration file or declare block.
TS1149An import declaration conflicts with the ambient context of the file.
TS1192The module you are importing does not have a default export.
TS1202The import = require() syntax cannot be used in an ES module.
TS2328Two construct signatures (new() calls) have incompatible types.
TS2352A type assertion between two types that have no overlap might be an error.
TS2448A variable declared with let or const is referenced before its declaration in the same block.
TS2459A destructured import references a member that is not exported from the module.
TS2464A computed property name in a type literal must be a simple expression.
TS2507The expression used with new is not a constructor type.
TS2538The type of the index expression is not valid for indexing the object.
TS2559The source type has no properties in common with the target type.
TS2589A recursive type reaches TypeScript's maximum instantiation depth.
TS2590The resulting type expression creates a union with too many members for TypeScript to represent.
TS2610A derived class defines a property where the base class has an accessor.
TS2786A component's return type is not compatible with JSX element types.
TS17004JSX fragments (<>...</>) require a jsxFragmentFactory or React.Fragment to be available.
TS5097Two incompatible compiler options are set simultaneously in tsconfig.
TS5023An unrecognized option was found in tsconfig.json.
TS5075A compiler option requires a specific moduleResolution setting to be used.
TS1131TypeScript expected a property declaration or method signature but found something else.
TS1219Decorators require the experimentalDecorators compiler option to be enabled.
TS1270A decorator is placed before the export keyword, which is not allowed.
TS2775A type assertion function requires all parameter types to be explicitly annotated.
TS4111A property is accessed using a string index on a type that uses noPropertyAccessFromIndexSignature.
TS4058The return type of a function cannot be named without importing a type from another module.
TS4055The return type of an exported function references a private or non-exported type.
TS2698The spread operator (...) is used on a value that may not be an object type.
TS2362The left operand of an arithmetic expression must be a number or bigint type.
TS2363The right operand of an arithmetic expression must be a number or bigint type.
TS2783A spread argument in a function call must be a tuple type or passed to a rest parameter.
TS2820A JSX element type does not have any matching call or construct signatures.
TS1343The import/export syntax requires the file to be treated as a module.
TS2742The inferred type of a declaration cannot be named without a dependency that is not available.
TS18047TypeScript warns that a value could be null and you are using it without checking.
TS2810A JSX attribute expected a boolean value but received a different type.
TS2353An object literal passed directly to a function contains properties not in the expected type.
TS2339A prop is passed to a React component that does not accept it in its type definition.
TS2786The expression cannot be used as a JSX component because its return type is not valid.
TS1479The relative import path requires a file extension under Node.js ESM resolution.
TS2688TypeScript cannot find the type definition file specified in types or typeRoots.
TS4082The default export requires a type annotation when generating declaration files.
TS2669Module augmentation declarations must be in a file that is recognized as an external module.
TS2856A @ts-check comment is used in a TypeScript file where it has no effect.