Skip to content

Commit 61f92a3

Browse files
authored
Fix api check - array properties under namespaces (#2731)
1 parent 2ba971d commit 61f92a3

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

scripts/components/api-changes-validator/test-resources/test-projects/without-breaks/project-with-namespace/API.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ type SomeTypeUnderSubNamespace = {
1414

1515
type SomeOtherTypeUnderSubNamespace = {
1616
someProperty: SomeTypeUnderSubNamespace;
17+
someArrayProperty: SomeTypeUnderSubNamespace[];
1718
};
1819

1920
class SomeClassUnderNamespace {

scripts/components/api-changes-validator/test-resources/test-projects/without-breaks/project-with-namespace/src/some_sub_namespace.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ export type SomeTypeUnderSubNamespace = {
44

55
export type SomeOtherTypeUnderSubNamespace = {
66
someProperty: SomeTypeUnderSubNamespace;
7+
someArrayProperty: SomeTypeUnderSubNamespace[];
78
};

scripts/components/api-changes-validator/usage_statemets_renderer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export class UsageStatementsRenderer {
7070
// characters that can be found before or after symbol
7171
// this is to prevent partial matches in case one symbol's characters are subset of longer one
7272
const possibleSymbolPrefix = '[\\s\\,\\(<;]';
73-
const possibleSymbolSuffix = '[\\s\\,\\(\\)<>;\\.]';
73+
const possibleSymbolSuffix = '[\\s\\,\\(\\)<>;\\.[]';
7474
const regex = new RegExp(
7575
`(${possibleSymbolPrefix})(${symbolName})(${possibleSymbolSuffix})`,
7676
'g',

0 commit comments

Comments
 (0)