File tree Expand file tree Collapse file tree 3 files changed +20
-5
lines changed Expand file tree Collapse file tree 3 files changed +20
-5
lines changed Original file line number Diff line number Diff line change 1+ export { } ;
2+
3+ declare global {
4+ var window : {
5+ location ?: {
6+ pathname ?: string ;
7+ } ;
8+ [ key : string ] : unknown ;
9+ } ;
10+ }
Original file line number Diff line number Diff line change 11export const createLocation = ( ) => {
2- // @ts -expect-error: allow non-read
3- window . location = window . location || {
4- pathname : 'default' ,
5- } ;
2+ if ( ! global . window ) {
3+ global . window = { } ;
4+ }
5+
6+ if ( ! global . window . location ) {
7+ global . window . location = {
8+ pathname : 'default' ,
9+ } ;
10+ }
611} ;
Original file line number Diff line number Diff line change 22 "compilerOptions" : {
33 "target" : " ESNext" ,
44 "module" : " ESNext" ,
5- "lib" : [" ESNext" , " DOM " ],
5+ "lib" : [" ESNext" ],
66 "moduleResolution" : " Node" ,
77 "useDefineForClassFields" : false ,
88 "declaration" : false ,
You can’t perform that action at this time.
0 commit comments