Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: thomasnordquist <7721625+thomasnordquist@users.noreply.github.com> Co-authored-by: Thomas Nordquist <thomasnordquist@users.noreply.github.com>
28 lines
462 B
TypeScript
28 lines
462 B
TypeScript
import * as React from 'react'
|
|
import ShowText from './ShowText'
|
|
import Mouse from './Mouse'
|
|
|
|
let heapdump: any
|
|
|
|
function writeHeapdump(path?: string) {
|
|
if (!heapdump) {
|
|
// <heapdump = require('heapdump')
|
|
}
|
|
|
|
heapdump.writeSnapshot(path || `${Date.now()}.heapsnapshot`)
|
|
return path
|
|
}
|
|
|
|
;(window as any).demo = {
|
|
writeHeapdump,
|
|
}
|
|
|
|
export default function render(props: any) {
|
|
return (
|
|
<span>
|
|
<ShowText />
|
|
<Mouse />
|
|
</span>
|
|
)
|
|
}
|