@hcaptcha/types
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "@hcaptcha/types", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"license": "MIT", | ||
@@ -22,3 +22,3 @@ "private": false, | ||
}, | ||
"gitHead": "7c9b58d04b5701a87f7cd058080778d5a4523b2a" | ||
"gitHead": "5dfc915a429def981e95396a9094b4e38b466b62" | ||
} |
@@ -18,4 +18,51 @@ ## hCaptcha TypeScript Definitions | ||
### How to use | ||
#### Locally in file | ||
```ts | ||
import '@hcaptcha/types'; | ||
// `hcaptcha` now is defined on the global object | ||
hcaptcha.execute(); | ||
``` | ||
or | ||
```ts | ||
///<reference types="@hcaptcha/types"/> | ||
// `hcaptcha` now is defined on the global object | ||
hcaptcha.execute(); | ||
``` | ||
#### Globally | ||
Add import or reference to your `.d.ts`: | ||
```ts | ||
import "@hcaptcha/types"; | ||
// or | ||
/// <reference types="@hcaptcha/types"/> | ||
``` | ||
Or add `"node_modules/@hcaptcha"` to the `typeRoots` in `tsconfig.json` | ||
```json | ||
{ | ||
"compilerOptions": { | ||
// ... | ||
"typeRoots": [ | ||
"node_modules/@hcaptcha" | ||
] | ||
// ... | ||
}, | ||
// ... | ||
} | ||
``` | ||
### Bug Report | ||
If you encounter an issue and would like to report it, please email us at [support@hcaptcha.com](mailto:support@hcaptcha.com). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6929
68