cocacolabear / types-ragemp-s Goto Github PK
View Code? Open in Web Editor NEWRage:MP TypeScript type definition for Server-side
Home Page: https://rage.mp/
License: MIT License
Rage:MP TypeScript type definition for Server-side
Home Page: https://rage.mp/
License: MIT License
Line 233 in 8133078
'callToStreamed', which lacks return-type annotation, implicitly has an 'any' return type.
Does anyone know what this method returns?
Thanks
https://wiki.rage.mp/index.php?title=Changelog#Events_examples
// Per-entity (available for all of entities) event manager
mp.events.add("playerJoin", (player) =>
{
player.events.push("playerSpawn", (player) =>
{
mp.players.broadcast(`hey ${player.name}, this is your first spawn!`);
return true; // return true from the event to destroys it for the entity after execution
});
});
I'm get error, when building with webpack and typescript loader.
package.json:
{
"devDependencies": {
"@types/ragemp-s": "github:CocaColaBear/types-ragemp-s",
"awesome-typescript-loader": "^3.4.1",
"typescript": "^2.6.2"
}
}
Error in console:
Hash: 2c4ae14775f72de3f336
Version: webpack 3.8.1
Time: 974ms
Asset Size Chunks Chunk Names
dist/bundle.js 22.6 kB 0 [emitted] main
dist/bundle.js.map 35 kB 0 [emitted] main
[20] ./src/modules ^\.\/.*$ 923 bytes {0} [built]
+ 27 hidden modules
ERROR in [at-loader] ./node_modules/@types/ragemp-s/index.d.ts:27:18
TS2503: Cannot find namespace 'RageEnums'.
ERROR in [at-loader] ./node_modules/@types/ragemp-s/index.d.ts:67:22
TS2503: Cannot find namespace 'RageEnums'.
ERROR in [at-loader] ./node_modules/@types/ragemp-s/index.d.ts:79:17
TS2503: Cannot find namespace 'RageEnums'.
ERROR in [at-loader] ./node_modules/@types/ragemp-s/index.d.ts:132:17
TS2503: Cannot find namespace 'RageEnums'.
ERROR in [at-loader] ./node_modules/@types/ragemp-s/index.d.ts:140:24
TS2503: Cannot find namespace 'RageEnums'.
ERROR in [at-loader] ./node_modules/@types/ragemp-s/index.d.ts:153:26
TS2503: Cannot find namespace 'RageEnums'.
ERROR in [at-loader] ./node_modules/@types/ragemp-s/index.d.ts:154:16
TS2503: Cannot find namespace 'RageEnums'.
ERROR in [at-loader] ./node_modules/@types/ragemp-s/index.d.ts:167:43
TS2503: Cannot find namespace 'RageEnums'.
ERROR in [at-loader] ./node_modules/@types/ragemp-s/index.d.ts:172:24
TS2503: Cannot find namespace 'RageEnums'.
ERROR in [at-loader] ./node_modules/@types/ragemp-s/index.d.ts:177:26
TS2503: Cannot find namespace 'RageEnums'.
ERROR in [at-loader] ./node_modules/@types/ragemp-s/index.d.ts:178:16
TS2503: Cannot find namespace 'RageEnums'.
ERROR in [at-loader] ./node_modules/@types/ragemp-s/index.d.ts:253:11
TS2503: Cannot find namespace 'RageEnums'.
ERROR in [at-loader] ./node_modules/@types/ragemp-s/index.d.ts:266:32
TS2503: Cannot find namespace 'RageEnums'.
ERROR in [at-loader] ./node_modules/@types/ragemp-s/index.d.ts:321:17
TS2503: Cannot find namespace 'RageEnums'.
[at-loader] Checking started in a separate process...
[at-loader] Checking finished with 14 errors
Same as CocaColaBear/types-ragemp-c#45
getOwnVariable - https://wiki.rage.mp/index.php?title=Entity::getOwnVariable
setOwnVariable - https://wiki.rage.mp/index.php?title=Entity::setOwnVariable
These methods are missing from EntityMp interface.
Hello. are you going to update the files? https://rage.mp/forums/topic/6575-rage-multiplayer-10-developer-preview-1-release / if so when?
v
I'm getting an error when I try to add events in a JSON format to the mp.events.add, I understand that you recently added an overload just for this specific reason but it seems to be giving me errors. I believe this is the line of code in question,
add(events: ({ [name: string]: (...args: any[]) => void; }[])): void;
(Line 248, index.d.ts)
I would try to fix it for you cause I understand that you are probably super business, but I don't understand that much about ts definition files so I will try to read up on some of it and maybe come up with a solution, anyways thanks for all the hard work, happy coding!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.