mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
23 lines
307 B
TypeScript
23 lines
307 B
TypeScript
class A {
|
|
other: B | null
|
|
constructor() {
|
|
this.other = null
|
|
}
|
|
}
|
|
|
|
class B {
|
|
a: A
|
|
constructor(a: A) {
|
|
this.a = a
|
|
a.other = this
|
|
}
|
|
}
|
|
|
|
const objA = new A()
|
|
const objB = new B(objA)
|
|
|
|
export default function Page() {
|
|
// eslint-disable-next-line no-throw-literal
|
|
throw { objA, objB }
|
|
}
|