mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Fix errors
This commit is contained in:
parent
fdc13d05d3
commit
15fac8e23b
@ -108,13 +108,7 @@ bad.get('b')
|
||||
// $ExpectError
|
||||
.put(X);
|
||||
|
||||
bad.get('b').put({
|
||||
// $ExpectError
|
||||
c: () => {},
|
||||
// $ExpectError
|
||||
d: X,
|
||||
// $ExpectError
|
||||
e: {
|
||||
f: () => {}
|
||||
}
|
||||
});
|
||||
// $ExpectError
|
||||
bad.get('b').put({ c: () => {}, d: X, e: { f: () => {} } });
|
||||
// $ExpectError
|
||||
bad.get('c').put(new X());
|
||||
|
||||
7
types/gun/index.d.ts
vendored
7
types/gun/index.d.ts
vendored
@ -1,8 +1,8 @@
|
||||
// Type definitions for gun 0.9.9999991
|
||||
// Type definitions for gun 0.9
|
||||
// Project: https://github.com/amark/gun#readme
|
||||
// Definitions by: Jack Works <https://github.com/Jack-Works>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.9
|
||||
// TypeScript Version: 3.1
|
||||
|
||||
declare const cons: Gun.Constructor;
|
||||
export = cons;
|
||||
@ -69,6 +69,7 @@ declare namespace Gun {
|
||||
}>;
|
||||
type Saveable<DataType> = Partial<DataType> | string | number | boolean | null | ChainReference<DataType>;
|
||||
type AckCallback = (ack: { err: Error; ok: any } | { err: undefined; ok: string }) => void;
|
||||
type Parameters<T extends (...args: any[]) => any> = T extends (...args: infer P) => any ? P : never;
|
||||
interface ChainReference<DataType = any, ReferenceKey = any, IsTop extends 'pre_root' | 'root' | false = false> {
|
||||
//#region API
|
||||
/**
|
||||
@ -407,7 +408,7 @@ declare namespace Gun {
|
||||
work(
|
||||
data: any,
|
||||
pair?: any,
|
||||
callback?: (data: string | void) => void,
|
||||
callback?: (data: string | undefined) => void,
|
||||
opt?: Partial<{
|
||||
name: 'SHA-256' | 'PBKDF2';
|
||||
encode: 'base64' | 'base32' | 'base16';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user