Skip to content

Commit

Permalink
Fix TypeScript lib check
Browse files Browse the repository at this point in the history
  • Loading branch information
D4isDAVID committed Sep 9, 2024
1 parent 643204c commit bbb9f30
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 9 deletions.
19 changes: 14 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"devDependencies": {
"@citizenfx/server": "^2.0.9780-1",
"@types/node": "16.9.1",
"@types/node": "^22.5.4",
"esbuild": "^0.23.1",
"patch-package": "^8.0.0",
"prettier": "^3.3.3",
Expand Down
20 changes: 20 additions & 0 deletions patches/@citizenfx+server+2.0.9780-1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/node_modules/@citizenfx/server/index.d.ts b/node_modules/@citizenfx/server/index.d.ts
index c46d22f..a8c6421 100644
--- a/node_modules/@citizenfx/server/index.d.ts
+++ b/node_modules/@citizenfx/server/index.d.ts
@@ -130,15 +130,6 @@ declare var GlobalState : StateBagInterface
declare function Player(entity: number|string): EntityInterface
declare var LocalPlayer : EntityInterface

-interface CitizenExports {
- (exportKey: string | number, exportFunction: Function): void;
- [resourceName: string] : {
- [exportKey: string | number]: Function
- };
-}
-
-declare var exports: CitizenExports;
-
declare var source: number;

// Commented methods are not implemented yet
File renamed without changes.
4 changes: 1 addition & 3 deletions server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@

"types": ["node", "@citizenfx/server"],

"lib": ["ES2021"],

"skipLibCheck": true
"lib": ["ES2021"]
},
"include": ["."]
}

0 comments on commit bbb9f30

Please sign in to comment.