mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Add use-ackee types (#46968)
This commit is contained in:
parent
8c2f251186
commit
f55496b5df
15
types/use-ackee/index.d.ts
vendored
Normal file
15
types/use-ackee/index.d.ts
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
// Type definitions for use-ackee 1.0
|
||||
// Project: https://github.com/electerious/use-ackee
|
||||
// Definitions by: Spencer Elliott <https://github.com/elliottsj>
|
||||
// Pablo Sáez <https://github.com/PabloSzx>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import { ServerDetails, TrackingOptions } from 'ackee-tracker';
|
||||
|
||||
declare function useAckee(pathname: string | null, server: ServerDetails, opts?: TrackingOptions): void;
|
||||
|
||||
declare namespace useAckee {
|
||||
function useAckee(pathname: string | null, server: ServerDetails, opts?: TrackingOptions): void;
|
||||
}
|
||||
|
||||
export = useAckee;
|
||||
23
types/use-ackee/tsconfig.json
Normal file
23
types/use-ackee/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"use-ackee-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/use-ackee/tslint.json
Normal file
1
types/use-ackee/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
20
types/use-ackee/use-ackee-tests.ts
Normal file
20
types/use-ackee/use-ackee-tests.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import { useAckee as useAckeeNamed } from 'use-ackee';
|
||||
// tslint:disable-next-line no-duplicate-imports
|
||||
import * as useAckee from 'use-ackee';
|
||||
|
||||
useAckeeNamed(
|
||||
'/current/path',
|
||||
{
|
||||
server: 'https://example.com',
|
||||
domainId: 'hd11f820-68a1-11e6-8047-79c0c2d9bce0',
|
||||
},
|
||||
{
|
||||
ignoreLocalhost: true,
|
||||
detailed: false,
|
||||
},
|
||||
);
|
||||
|
||||
useAckee('/', {
|
||||
server: 'https://example.com',
|
||||
domainId: 'hd11f820-68a1-11e6-8047-79c0c2d9bce0',
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user