CocaColaBear / types-ragemp-c

Rage:MP TypeScript type definition for Client-side
https://rage.mp/
MIT License
53 stars 60 forks source link

Referencing is buggy #17

Closed GamerFac3 closed 6 years ago

GamerFac3 commented 6 years ago

In my Code I reference ragemp-c in client code and ragemp-s in server code. Now my IntelliSense uses the Mp of ragemp-s for the declare const mp: Mp .. now I renamed it in the index.d.ts of the ragemp-c types to declare const cmp: CMp and of course changed the name of the type... Now I am getting ReferenceError from typescript..

my tsconfig.json if it helps you

{ "compilerOptions": { "alwaysStrict": true, "noImplicitAny": false, "noEmitOnError": true, "removeComments": false, "sourceMap": false, "skipLibCheck": true, "target": "es6", "module": "commonjs" }, "typeRoots": [ "node_modules/@types" ], "compileOnSave": true }

The Error I get:

https://i.imgur.com/OLAVe0H.png

CocaColaBear commented 6 years ago

Hi. Because cmp is not defined. In client and server only mp is defined. It's ragemp variable, not my) The use two types (ragemp-s and ragemp-c) in the same project is not possible. Use different projects

GamerFac3 commented 6 years ago

Was my fault... didn't thought about this fact.. sorry