Giter Club home page Giter Club logo

altv-types's Introduction

altv-types

This repository contains types definitions for the alt:V JavaScript modules.

Installation

Client-side

# With npm
npm i -D @altv/types-shared @altv/types-client @altv/types-natives @altv/types-webview
# With yarn
yarn add -D @altv/types-shared @altv/types-client @altv/types-natives @altv/types-webview

Server-side

# With npm
npm i -D @altv/types-shared @altv/types-server
# With yarn
yarn add -D @altv/types-shared @altv/types-server

To make these types detectable, you've to add typeRoots property below to your project's tsconfig.json

{
  "compilerOptions": {
    "typeRoots": ["./node_modules/@types", "./node_modules/@altv"]
  }
}

altv-types's People

Contributors

actions-user avatar c0kkie avatar deluvas1911 avatar doxoh avatar edgarasx avatar florianv85 avatar germancitoz avatar gurkansahinn avatar justcup avatar katsutosh avatar kifkick avatar leonmrbonnie avatar mrgharabaghi avatar pixlcrashr avatar revyn112 avatar riffy avatar robdeflop avatar s0p4 avatar stuyk avatar tastydev avatar tomasvvv avatar unnvaldr avatar welaurs avatar xluxy avatar xxshady avatar yannbcf avatar yiin avatar zackaryh8 avatar zerefdev avatar zziger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

altv-types's Issues

Return type problem

Hello,

I don't know if I misunderstood how rpc types works but should not the return type of the onRpc be Promise<ReturnType<shared.ICustomServerClientRpc[K]>> | ReturnType<shared.ICustomServerClientRpc[K]>) and not Promise<ReturnType<shared.ICustomClientServerRpc[K]>> | ReturnType<shared.ICustomClientServerRpc[K]>) in the client module ?

It's at line 2612:

export function onRpc<K extends keyof shared.ICustomServerClientRpc>(rpcName: K, listener: (...args: Parameters<shared.ICustomServerClientRpc[K]>) => Promise<ReturnType<shared.ICustomClientServerRpc[K]>> | ReturnType<shared.ICustomClientServerRpc[K]>): void;

Separate package for AltV Enums to be used in browser/webview clients.

Hey there,

I wanted to drop a feature request to create a new package or add it to the current webview types for the AltV enums. It'd be nice to have things like Vector3, which are shared on AltV also available in the webview types. Right now I have custom converters and such, which is not really nice as those values are shared and should work without a hazzle for a webview.

Would it be possible to have a solution for that discussed? If it's either a package or an include into the webview types.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.