File tree Expand file tree Collapse file tree 3 files changed +18
-4
lines changed
Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -19,8 +19,12 @@ function copyProps(src, target) {
1919// @ts -expect-error TS2322 🤷♂️
2020global . window = window
2121global . document = window . document
22- // @ts -expect-error TS2740 🤷♂️
23- global . navigator = { userAgent : 'node.js' }
22+ // Use Object.defineProperty to set navigator because in Node 21+ it's read-only
23+ Object . defineProperty ( global , 'navigator' , {
24+ value : { userAgent : 'node.js' } ,
25+ writable : true ,
26+ configurable : true ,
27+ } )
2428global . requestAnimationFrame = callback => setTimeout ( callback , 0 )
2529global . cancelAnimationFrame = id => clearTimeout ( id )
2630copyProps ( window , global )
Original file line number Diff line number Diff line change 1+ // Type declaration override for remark-mdx-images to fix type compatibility issues
2+ declare module 'remark-mdx-images' {
3+ import type { Plugin } from 'unified'
4+ const remarkMdxImages : Plugin
5+ export default remarkMdxImages
6+ }
Original file line number Diff line number Diff line change 88 "checkJs" : true ,
99 "lib" : [
1010 " ES2021.String"
11- ]
12- }
11+ ],
12+ "skipLibCheck" : true
13+ },
14+ "exclude" : [
15+ " node_modules"
16+ ]
1317}
You can’t perform that action at this time.
0 commit comments