Wondering what’s next for npm?Check out our public roadmap! »

@nextcloud/typingsTypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@nextcloud/typings

Build Status

Versioned typings for the (internal) JavaScript APIs of Nextcloud used in higher level packages.

Usage

You can use this package to verify your API usage is compatible with a range of Nextcloud versions

/// <reference types="nextcloud-typings" />
 
declare var OC: Nextcloud.v17.OC | Nextcloud.v18.OC | Nextcloud.v19.OC | Nextcloud.v20.OC;
 
OC.L10N.translate("app", "text")

The TypeScript compiler will translate the code above to OC.L10N.translate("app", "text"); and throws an error if any of the Nextcloud versions in use for the union type do not exist on all interfaces.

Keywords

Install

npm i @nextcloud/typings

DownloadsWeekly Downloads

9,459

Version

1.0.0

License

GPL-3.0-or-later

Unpacked Size

43.8 kB

Total Files

17

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar