mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-01 22:21:48 +00:00
* oxmysql and some lib interface fixes - Various fixes throughout oxmysql - started ox_lib audit * chore: More clean up - Reword some confusing descriptions - Add some descriptions - Type fixes - Spelling and grammar fixes - Swapping in `-` where `*` used to be for bullet point consistency ox_lib - Interface, ACL through GetClosestVehicle audited * chore: Finishing up ox_lib
33 lines
597 B
Plaintext
33 lines
597 B
Plaintext
### lib.checkDependency
|
|
|
|
Check if a resource is using a specified version or higher, allowing for compatibility checks or throwing errors.
|
|
|
|
import { Tabs, Tab } from 'nextra-theme-docs';
|
|
|
|
```lua
|
|
lib.checkDependency(resource, version)
|
|
```
|
|
|
|
- resource: `string`
|
|
- version: `string`
|
|
|
|
<Tabs items={["Lua", "JS"]}>
|
|
<Tab>
|
|
|
|
```lua
|
|
if not lib.checkDependency('ox_lib', '1.5.0') then error() end
|
|
```
|
|
|
|
</Tab>
|
|
<Tab>
|
|
|
|
```ts
|
|
import lib from '@overextended/ox_lib/shared'
|
|
// import { checkDependency } from '@overextended/ox_lib/shared'
|
|
|
|
if (!lib.checkDependency('ox_lib', '1.5.0')) error()
|
|
```
|
|
|
|
</Tab>
|
|
</Tabs>
|