Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added required argument to alt.log #299

Merged
merged 2 commits into from
Feb 28, 2024
Merged

Added required argument to alt.log #299

merged 2 commits into from
Feb 28, 2024

Conversation

WelaurS
Copy link
Contributor

@WelaurS WelaurS commented Feb 28, 2024

Expected behavior: TypeScript will highlight an error if the arguments are empty

Current behavior: TypeScript allows the use of empty arguments, resulting in an exception being thrown during execution

Expected behavior: TypeScript will highlight an error if the arguments are empty

Current behavior: TypeScript allows the use of empty arguments, resulting in an exception being thrown during execution
@WelaurS WelaurS requested a review from C0kkie as a code owner February 28, 2024 02:11
@xLuxy
Copy link
Contributor

xLuxy commented Feb 28, 2024

Could you please also do it for the other log methods?

@xLuxy xLuxy merged commit 30ca4ac into altmp:dev Feb 28, 2024
1 check passed
@xxshady
Copy link
Contributor

xxshady commented Mar 7, 2024

Thanks for improving type safety ❤️

C0kkie pushed a commit that referenced this pull request Jan 14, 2025
* feat(client): type safety for useStreaming (#298)

adds second overload for constructors with `useStreaming` and `streamingDistance` so it is impossible to use `useStreaming` alone (leading to unwanted behavior)

* fix(client): typos (#297)

* feat(client): type safety for useStreaming (#298)

adds second overload for constructors with `useStreaming` and `streamingDistance` so it is impossible to use `useStreaming` alone (leading to unwanted behavior)

* fix(client): typos (#297)

* feat(webview): Add getPermissionState typing

* feat(webview): Add getPermissionState typing

* chore(webview, client): Bump version

* chore(webview, client): Bump version

* fix(webview): Formatting

* fix(webview): Formatting

* chore(webview, client): Bump version

* chore(webview, client): Bump version

* fix(shared): Added required first argument to alt.log methods (#299)

* ci(shared): Bump version

* fix(server): virtual entity description (#306)

* chore: update imports in examples (#303)

* chore: remove outdated event beforePlayerConnect (#304)

* chore: add package.json to first resource article (#302)

* feat: add server debugging article (#309)

* chore: add more descriptions for virtual entity API (#307)

* chore: edit text labels to avoid confusion with 15.0 text labels (#305)

* feat(client): add alt.Object.streamedIn (#312)

* chore(client): Bump version

* feat(client): add alt.Object.streamedIn (#312)

* chore(client): Bump version

* chore: improve getClosestEntities description (#310)

* chore: improve getClosestEntities description (#310)

* chore(server): Bump version

* chore(server): Bump version

* fix(client): add missing Ped.getByRemoteID (#314)

* fix(client, server): fix and improve RPC docs (#315)

* Update requirements list (#317)

* Fixed wrong name in event docs (#316)

* fix(client): add missing Ped.getByRemoteID (#314)

* fix(client, server): fix and improve RPC docs (#315)

* Update requirements list (#317)

* Fixed wrong name in event docs (#316)

* chore: Bump version

* feat(client): Add reloadVehiclePhysics

* chore(client)!: Deprecate setWatermarkPosition and it's enum

* chore(client)!: Deprecate setWatermarkPosition and it's enum

* chore: Bump version

* chore: Bump version

* chore(server): add some descriptions of voice channel properties (#318)

* chore(server): add some descriptions of voice channel properties (#318)

* chore: Bump version

* chore: Bump version

* fix(natives): Fix nullable string parameters

* fix(natives): Fix nullable string return type

* chore: Bump version

* fix(natives): Fix nullable string parameters

* fix(natives): Fix nullable string return type

* chore: Bump version

* feat(client, server, shared): switch to normal enums (#319)

* chore: Bump version

* feat(client): Add new methods

* feat(client): Add new methods

* chore: Bump version

* chore: Bump version

* chore: Bump version

* chore: update math snippet (#320)

* feat(client, server, shared): switch to normal enums (#319)

* chore: Bump version

* Merge 'dev' into 'rc'

* chore: Bump version

* chore: remove outdated workers article (#323)

* feat: add multiple metadata setters (#322)

* chore(shared): fix angleTo return type of vector2 (#324)

* chore: remove outdated workers article (#323)

* feat: add multiple metadata setters (#322)

* chore(shared): fix angleTo return type of vector2 (#324)

* chore: Bump version

* chore: Bump version

* feat(client): Interior API (#325)

* feat(client): Interior API

* chore(client): add description for getForInteriorID

* chore(client): add example

* fix(client): typo

* fix(client): InteriorRoom and InteriorPortal don't have public constructors (#326)

* feat(client): add config flag SWAP_ALLOW_HEAD_PROP_IN_VEHICLE_FLAG (#333)

* chore: Bump version

---------

Co-authored-by: xLuxy <67131061+xLuxy@users.noreply.github.com>
Co-authored-by: WelaurS <WelaurS@users.noreply.github.com>
Co-authored-by: DevPanda <49129501+devpanda0@users.noreply.github.com>
Co-authored-by: Dav-Renz <62567929+Dav-Renz@users.noreply.github.com>
Co-authored-by: S0P4 <agu_prin@live.com.ar>
C0kkie pushed a commit that referenced this pull request Jan 14, 2025
* feat(client): type safety for useStreaming (#298)

adds second overload for constructors with `useStreaming` and `streamingDistance` so it is impossible to use `useStreaming` alone (leading to unwanted behavior)

* fix(client): typos (#297)

* feat(webview): Add getPermissionState typing

* chore(webview, client): Bump version

* fix(webview): Formatting

* chore(webview, client): Bump version

* fix(shared): Added required first argument to alt.log methods (#299)

* ci(shared): Bump version

* fix(server): virtual entity description (#306)

* chore: update imports in examples (#303)

* chore: remove outdated event beforePlayerConnect (#304)

* chore: add package.json to first resource article (#302)

* feat: add server debugging article (#309)

* chore: add more descriptions for virtual entity API (#307)

* chore: edit text labels to avoid confusion with 15.0 text labels (#305)

* feat(client): add alt.Object.streamedIn (#312)

* chore(client): Bump version

* chore: improve getClosestEntities description (#310)

* chore(server): Bump version

* fix(client): add missing Ped.getByRemoteID (#314)

* fix(client, server): fix and improve RPC docs (#315)

* Update requirements list (#317)

* Fixed wrong name in event docs (#316)

* chore: Bump version

* feat(client): Add reloadVehiclePhysics

* chore(client)!: Deprecate setWatermarkPosition and it's enum

* chore: Bump version

* chore(server): add some descriptions of voice channel properties (#318)

* chore: Bump version

* fix(natives): Fix nullable string parameters

* fix(natives): Fix nullable string return type

* chore: Bump version

* feat(client, server, shared): switch to normal enums (#319)

* chore: Bump version

* feat(client): Add new methods

* chore: Bump version

* chore: update math snippet (#320)

* chore: remove outdated workers article (#323)

* feat: add multiple metadata setters (#322)

* chore(shared): fix angleTo return type of vector2 (#324)

* chore: Bump version

* feat(client): Interior API (#325)

* feat(client): Interior API

* chore(client): add description for getForInteriorID

* chore(client): add example

* fix(client): typo

* fix(client): InteriorRoom and InteriorPortal don't have public constructors (#326)

* feat(client): add config flag SWAP_ALLOW_HEAD_PROP_IN_VEHICLE_FLAG (#333)

* chore: Bump version

---------

Co-authored-by: xLuxy <67131061+xLuxy@users.noreply.github.com>
Co-authored-by: WelaurS <WelaurS@users.noreply.github.com>
Co-authored-by: DevPanda <49129501+devpanda0@users.noreply.github.com>
Co-authored-by: Dav-Renz <62567929+Dav-Renz@users.noreply.github.com>
Co-authored-by: S0P4 <agu_prin@live.com.ar>
Doxoh pushed a commit that referenced this pull request Jan 29, 2025
* feat(client): type safety for useStreaming (#298)

adds second overload for constructors with `useStreaming` and `streamingDistance` so it is impossible to use `useStreaming` alone (leading to unwanted behavior)

* fix(client): typos (#297)

* feat(webview): Add getPermissionState typing

* chore(webview, client): Bump version

* fix(webview): Formatting

* chore(webview, client): Bump version

* fix(shared): Added required first argument to alt.log methods (#299)

* ci(shared): Bump version

* fix(server): virtual entity description (#306)

* chore: update imports in examples (#303)

* chore: remove outdated event beforePlayerConnect (#304)

* chore: add package.json to first resource article (#302)

* feat: add server debugging article (#309)

* chore: add more descriptions for virtual entity API (#307)

* chore: edit text labels to avoid confusion with 15.0 text labels (#305)

* feat(client): add alt.Object.streamedIn (#312)

* chore(client): Bump version

* chore: improve getClosestEntities description (#310)

* chore(server): Bump version

* fix(client): add missing Ped.getByRemoteID (#314)

* fix(client, server): fix and improve RPC docs (#315)

* Update requirements list (#317)

* Fixed wrong name in event docs (#316)

* chore: Bump version

* feat(client): Add reloadVehiclePhysics

* chore(client)!: Deprecate setWatermarkPosition and it's enum

* chore: Bump version

* chore(server): add some descriptions of voice channel properties (#318)

* chore: Bump version

* fix(natives): Fix nullable string parameters

* fix(natives): Fix nullable string return type

* chore: Bump version

* feat(client, server, shared): switch to normal enums (#319)

* chore: Bump version

* feat(client): Add new methods

* chore: Bump version

* chore: update math snippet (#320)

* chore: remove outdated workers article (#323)

* feat: add multiple metadata setters (#322)

* chore(shared): fix angleTo return type of vector2 (#324)

* chore: Bump version

* feat(client): Interior API (#325)

* feat(client): Interior API

* chore(client): add description for getForInteriorID

* chore(client): add example

* fix(client): typo

* fix(client): InteriorRoom and InteriorPortal don't have public constructors (#326)

* feat(client): add config flag SWAP_ALLOW_HEAD_PROP_IN_VEHICLE_FLAG (#333)

* chore: Bump version (#327)

* feat(server): Vehicle wheel API (#336)

* feat(client): new WebView API (#335)

* feat(client): new WebView API

* fix(client): new WebView API

* feat(client|server): various new APIs (#337)

* chore: Bump version

* feat(server): add sourceEntity to weaponDamage event (#334)

---------

Co-authored-by: xLuxy <67131061+xLuxy@users.noreply.github.com>
Co-authored-by: WelaurS <WelaurS@users.noreply.github.com>
Co-authored-by: DevPanda <49129501+devpanda0@users.noreply.github.com>
Co-authored-by: Dav-Renz <62567929+Dav-Renz@users.noreply.github.com>
Co-authored-by: S0P4 <agu_prin@live.com.ar>
Doxoh pushed a commit that referenced this pull request Jan 29, 2025
* feat(client): type safety for useStreaming (#298)

adds second overload for constructors with `useStreaming` and `streamingDistance` so it is impossible to use `useStreaming` alone (leading to unwanted behavior)

* fix(client): typos (#297)

* feat(webview): Add getPermissionState typing

* chore(webview, client): Bump version

* fix(webview): Formatting

* chore(webview, client): Bump version

* fix(shared): Added required first argument to alt.log methods (#299)

* ci(shared): Bump version

* fix(server): virtual entity description (#306)

* chore: update imports in examples (#303)

* chore: remove outdated event beforePlayerConnect (#304)

* chore: add package.json to first resource article (#302)

* feat: add server debugging article (#309)

* chore: add more descriptions for virtual entity API (#307)

* chore: edit text labels to avoid confusion with 15.0 text labels (#305)

* feat(client): add alt.Object.streamedIn (#312)

* chore(client): Bump version

* chore: improve getClosestEntities description (#310)

* chore(server): Bump version

* fix(client): add missing Ped.getByRemoteID (#314)

* fix(client, server): fix and improve RPC docs (#315)

* Update requirements list (#317)

* Fixed wrong name in event docs (#316)

* chore: Bump version

* feat(client): Add reloadVehiclePhysics

* chore(client)!: Deprecate setWatermarkPosition and it's enum

* chore: Bump version

* chore(server): add some descriptions of voice channel properties (#318)

* chore: Bump version

* fix(natives): Fix nullable string parameters

* fix(natives): Fix nullable string return type

* chore: Bump version

* feat(client, server, shared): switch to normal enums (#319)

* chore: Bump version

* feat(client): Add new methods

* chore: Bump version

* chore: update math snippet (#320)

* chore: remove outdated workers article (#323)

* feat: add multiple metadata setters (#322)

* chore(shared): fix angleTo return type of vector2 (#324)

* chore: Bump version

* feat(client): Interior API (#325)

* feat(client): Interior API

* chore(client): add description for getForInteriorID

* chore(client): add example

* fix(client): typo

* fix(client): InteriorRoom and InteriorPortal don't have public constructors (#326)

* feat(client): add config flag SWAP_ALLOW_HEAD_PROP_IN_VEHICLE_FLAG (#333)

* chore: Bump version (#327)

* feat(server): Vehicle wheel API (#336)

* feat(client): new WebView API (#335)

* feat(client): new WebView API

* fix(client): new WebView API

* feat(client|server): various new APIs (#337)

* chore: Bump version

* feat(server): add sourceEntity to weaponDamage event (#334)

---------

Co-authored-by: xLuxy <67131061+xLuxy@users.noreply.github.com>
Co-authored-by: WelaurS <WelaurS@users.noreply.github.com>
Co-authored-by: DevPanda <49129501+devpanda0@users.noreply.github.com>
Co-authored-by: Dav-Renz <62567929+Dav-Renz@users.noreply.github.com>
Co-authored-by: S0P4 <agu_prin@live.com.ar>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants