Skip to content

Commit bd9ff4b

Browse files
committed
Added 19 more translations
1 parent 12bf1ae commit bd9ff4b

File tree

21 files changed

+102
-1
lines changed

21 files changed

+102
-1
lines changed

.changeset/hot-toes-obey.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@total-typescript/error-translation-engine': patch
3+
'ts-error-translator': patch
4+
---
5+
6+
Added 19 more translations.

packages/engine/errors/1015.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
original: 'Parameter cannot have question mark and initializer.'
3+
---
4+
5+
You can use a question mark or an default value, but not both at once.

packages/engine/errors/1240.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
original: 'Unable to resolve signature of property decorator when called as an expression.'
3+
---
4+
5+
You can't use a decorator on an expression, like an arrow function.

packages/engine/errors/1254.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
original: "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference."
3+
---
4+
5+
You can't use runtime code in a declaration file.

packages/engine/errors/1268.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
original: "An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type."
3+
---
4+
5+
Objects in TypeScript (and JavaScript!) can only have strings, numbers or symbols as keys. [Template literal types](https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html) are a way of constructing strings.

packages/engine/errors/1434.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
original: 'Unexpected keyword or identifier.'
3+
---
4+
5+
There's a syntax error in your code, so I can't tell exactly what's wrong.

packages/engine/errors/2305.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
original: "Module '{0}' has no exported member '{1}'."
3+
---
4+
5+
'{1}' is not one of the things exported from '{0}'.

packages/engine/errors/2312.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
original: 'An interface can only extend an object type or intersection of object types with statically known members.'
3+
---
4+
5+
You might be trying to use an interface to extend a union type. This isn't possible.

packages/engine/errors/2365.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
original: "Operator '{0}' cannot be applied to types '{1}' and '{2}'."
3+
---
4+
5+
You can't use '{0}' on the types '{1}' and '{2}'.

packages/engine/errors/2488.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
original: "Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator."
3+
---
4+
5+
Type '{0}' isn't iterable. To make it iterable, add a [`Symbol.iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/iterator) key.

packages/engine/errors/2556.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
original: 'A spread argument must either have a tuple type or be passed to a rest parameter.'
3+
---
4+
5+
You're spreading arguments into a function. To do that, either the argument needs to be a tuple OR the function needs to accept a dynamic number of arguments.

packages/engine/errors/2604.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
original: "JSX element type '{0}' does not have any construct or call signatures."
3+
---
4+
5+
'{0}' cannot be used as a JSX component because it isn't a function.

packages/engine/errors/2614.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
original: "Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?"
3+
---
4+
5+
'{1}' is not one of the things exported from '{0}'. Did you mean to import '{1}' from '{0}' instead?

packages/engine/errors/2686.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
original: "'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead."
3+
---
4+
5+
You might not have configured `jsx` in your `tsconfig.json` correctly. [Learn more](https://www.totaltypescript.com/react-refers-to-a-umd-global).

packages/engine/errors/2722.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
original: "Cannot invoke an object which is possibly 'undefined'."
3+
---
4+
5+
This function might be undefined. You'll need to check it's defined before calling it.

packages/engine/errors/2739.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
original: "Type '{0}' is missing the following properties from type '{1}': {2}"
3+
---
4+
5+
'{0}' is missing some required properties from type '{1}': {2}.

packages/engine/errors/2775.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
original: 'Assertions require every name in the call target to be declared with an explicit type annotation.'
3+
---
4+
5+
You might be using an `asserts` keyword on an arrow function. If you are, change the function to use the `function` keyword.

packages/engine/errors/6244.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
original: "Cannot access ambient const enums when 'isolatedModules' is enabled."
3+
---
4+
5+
You can't use const enums when `isolatedModules` is enabled.

packages/engine/errors/7026.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
original: "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists."
3+
---
4+
5+
`JSX.IntrinsicElements` has not been declared in the global scope. [Learn more](https://www.totaltypescript.com/what-is-jsx-intrinsicelements).

packages/engine/errors/7053.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
original: "Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'."
3+
---
4+
5+
You can't use '{0}' to index into '{1}'. [This article](https://www.totaltypescript.com/concepts/type-string-cannot-be-used-to-index-type) might help.

packages/engine/src/tsErrorMessages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4862,7 +4862,7 @@
48624862
"code": 6243
48634863
},
48644864

4865-
"Modules": {
4865+
"Cannot access ambient const enums when 'isolatedModules' is enabled.": {
48664866
"category": "Message",
48674867
"code": 6244
48684868
},

0 commit comments

Comments
 (0)