From the reference libraryFiveM

Shared

ox/ox_lib/Version/Shared.mdx

Shared

lib.checkDependency

Check if a resource is using a specified version or higher, allowing for compatibility checks or throwing errors.

lib.checkDependency(resource, version)
  • resource: string

  • version: string

      ```lua
      if not lib.checkDependency('ox_lib', '1.5.0') then error() end
      ```
    
    
      ```ts
      import lib from '@overextended/ox_lib/shared'
      // import { checkDependency } from '@overextended/ox_lib/shared'
    
      if (!lib.checkDependency('ox_lib', '1.5.0')) error()
      ```
    
Back to documentation