Skip to content

Commit 8473db4

Browse files
committed
test: Add fixture for defineProperty call with recursive property access
This currently causes a Maximum call stack size exceeded exception within TypeScript's checker#typeToString method.
1 parent 508d81d commit 8473db4

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// See https://github.com/SAP/ui5-linter/issues/75
2+
Object.defineProperty(globalThis, "myProp", {
3+
value: true || window.foo
4+
});

test/lib/linter/snapshots/linter.ts.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,28 @@ Generated by [AVA](https://avajs.dev).
203203
},
204204
]
205205

206+
## General: RecursiveDefineProperty.js
207+
208+
> Snapshot 1
209+
210+
[
211+
{
212+
coverageInfo: [],
213+
errorCount: 1,
214+
fatalErrorCount: 1,
215+
filePath: 'RecursiveDefineProperty.js',
216+
messages: [
217+
{
218+
fatal: true,
219+
message: 'Maximum call stack size exceeded',
220+
ruleId: 'ui5-linter-parsing-error',
221+
severity: 2,
222+
},
223+
],
224+
warningCount: 0,
225+
},
226+
]
227+
206228
## General: TSLike.js
207229

208230
> Snapshot 1
150 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)