Skip to content

Commit 8e5927f

Browse files
authored
chore: fix typo in error message - delcaration (#4514)
Observed the error below: `The implemented delcaration is here.` `delcaration` - I kept looking at this because it hurt my eyes until I finally realized it was a typo. At the very least, this can be closed as won't fix so that at least there will be a record for the next person that searches for an issue or fix for it. ## Observed Error Message ``` [2024-05-15T12:22:12.636] [ERROR] jsii/compiler - Type model errors prevented the JSII assembly from being created src/myconstruct.ts:191:31 - error JSII5004: "cdkConstruct.MyConstruct#dynamoDBTable" changes the property type to "aws-cdk-lib.aws_dynamodb.Table" when implementing cdkConstruct.IMyConstruct. Change it to "aws-cdk-lib.aws_dynamodb.ITable" 191 public get dynamoDBTable(): dynamodb.Table | undefined { ~~~~~~~~~~~~~~~~~~~~~~~~~~ src/myconstruct.ts:174:28 174 readonly dynamoDBTable?: dynamodb.ITable; ~~~~~~~~~~~~~~~ The implemented delcaration is here. 👾 Task "build » compile" failed when executing "jsii --silence-warnings=reserved-word" (cwd: packages/cdk) ``` --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
1 parent 212676c commit 8e5927f

9 files changed

Lines changed: 23 additions & 23 deletions

File tree

gh-pages/content/specification/2-type-system.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ Typescript allows grouping declarations together in _namespaces_, which are inte
325325
_Submodules_ names are the fully qualified name of the namespace from the package's root (if a package `foo` defines a
326326
namespace `ns1`, which itself contains `ns2`, the submodule for `ns2` will be named `foo.ns1.ns2`).
327327

328-
_Submodules_ are delcared in the _jsii_ assembly under the `submodules` key. This is also where specific
328+
_Submodules_ are declared in the _jsii_ assembly under the `submodules` key. This is also where specific
329329
[configuration](#submodule-configuration) is registered, if different from the parent submodule or package.
330330

331331
_Submodules_ are hierarchical, and their fully qualified name is representative of the relationship. For example the

gh-pages/content/specification/3-kernel-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ Sometimes, the _host_ app will extend a _jsii_ class and implement new _jsii_ in
246246
original type. Such interfaces must be declared by providing their _jsii_ fully qualified name as an entry in the
247247
`interfaces` list.
248248

249-
Providing interfaces in this list that are implicitly present from another delcaration (either because they are already
249+
Providing interfaces in this list that are implicitly present from another declaration (either because they are already
250250
implemented by the class denoted by the `fqn` field, or because another entry in the `interfaces` list extends it) is
251251
valid, but not necessary. The `@jsii/kernel` is responsible for correctly handling redundant declarations.
252252

jest.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export function overriddenConfig(overrides) {
6464
]);
6565

6666
// TypeScript appears to choke if we do the "as any" in the same
67-
// expression as the key access, so we delcare surrogate varibales...
67+
// expression as the key access, so we declare surrogate variables...
6868
for (const key of Array.from(allKeys).sort()) {
6969
const originalValue = original[key];
7070
const overrideValue = override[key];

packages/jsii-rosetta/lib/languages/go.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ interface GoLanguageContext {
3636
isPtrAssignmentRValue: boolean;
3737

3838
/**
39-
* Whether the current element is a parameter delcaration name.
39+
* Whether the current element is a parameter declaration name.
4040
*/
4141
isParameterName: boolean;
4242

@@ -46,7 +46,7 @@ interface GoLanguageContext {
4646
isStruct: boolean;
4747

4848
/**
49-
* Whether the context is within an interface delcaration.
49+
* Whether the context is within an interface declaration.
5050
*/
5151
isInterface: boolean;
5252

packages/jsii-rosetta/lib/submodule-reference.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export class SubmoduleReference {
8181

8282
/**
8383
* Determines what symbols are imported by the given TypeScript import
84-
* delcaration, in the context of the specified file, using the provided type
84+
* declaration, in the context of the specified file, using the provided type
8585
* checker.
8686
*
8787
* @param decl an import declaration.

packages/jsii/lib/assembler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ export class Assembler implements Emitter {
853853
}
854854
this._submoduleMap.set(symbol, ns);
855855

856-
// If the exported symbol has any declaration, and that delcaration is of
856+
// If the exported symbol has any declaration, and that declaration is of
857857
// an entity that can have nested declarations of interest to jsii
858858
// (classes, interfaces, enums, modules), we need to also associate those
859859
// nested symbols to the submodule (or they won't be named correctly!)

packages/jsii/lib/jsii-diagnostic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ export class JsiiDiagnostic implements ts.Diagnostic {
575575
public static readonly JSII_5013_STATIC_INSTANCE_CONFLICT = Code.error({
576576
code: 5013,
577577
formatter: (member: string, type: spec.ClassType) =>
578-
`Member "${member}" of class "${type.fqn}" has both a static and an instance delcaration`,
578+
`Member "${member}" of class "${type.fqn}" has both a static and an instance declaration`,
579579
name: 'language-compatibility/static-instance-conflict',
580580
});
581581

packages/jsii/lib/validator.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ function _defaultValidations(): ValidationFunction[] {
523523
mod.kind === ts.SyntaxKind.PublicKeyword ||
524524
mod.kind === ts.SyntaxKind.ProtectedKeyword,
525525
) ?? declarationName(expectedNode),
526-
'The implemented delcaration is here.',
526+
'The implemented declaration is here.',
527527
),
528528
);
529529
}
@@ -537,7 +537,7 @@ function _defaultValidations(): ValidationFunction[] {
537537
expected.type,
538538
).maybeAddRelatedInformation(
539539
expectedNode?.type ?? declarationName(expectedNode),
540-
'The implemented delcaration is here.',
540+
'The implemented declaration is here.',
541541
),
542542
);
543543
}
@@ -555,7 +555,7 @@ function _defaultValidations(): ValidationFunction[] {
555555
expectedNode?.modifiers?.find(
556556
(mod) => mod.kind === ts.SyntaxKind.ReadonlyKeyword,
557557
) ?? declarationName(expectedNode),
558-
'The implemented delcaration is here.',
558+
'The implemented declaration is here.',
559559
),
560560
);
561561
}
@@ -573,7 +573,7 @@ function _defaultValidations(): ValidationFunction[] {
573573
expectedNode?.questionToken ??
574574
expectedNode?.type ??
575575
declarationName(expectedNode),
576-
'The implemented delcaration is here.',
576+
'The implemented declaration is here.',
577577
),
578578
);
579579
}

packages/jsii/test/__snapshots__/negatives.test.js.snap

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)