mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-01 14:38:50 +00:00
move ox_lib modules to subdirectory
This commit is contained in:
1 parent
97b129e0fa
commit
ba094e1fb3
42 files changed
+1
-1
No files matched your search
@@ -0,0 +1,33 @@
|
||||
### lib.checkDependency
|
||||
|
||||
Check if a resource is using a specified version or higher, allowing for compatibility checks or throwing errors.
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
```lua
|
||||
lib.checkDependency(resource, version)
|
||||
```
|
||||
|
||||
* resource: `string`
|
||||
* version: `string`
|
||||
|
||||
<Tabs>
|
||||
<TabItem value='Lua'>
|
||||
|
||||
```lua
|
||||
if not lib.checkDependency('ox_lib', '1.5.0') then error() end
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value='JS/TS'>
|
||||
|
||||
```ts
|
||||
import lib from '@overextended/ox_lib/shared'
|
||||
// import { checkDependency } from '@overextended/ox_lib/shared'
|
||||
|
||||
if (!lib.checkDependency('ox_lib', '1.5.0')) error()
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
Reference in new issue
Block a user