mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-05 14:59:37 +08:00
Update and lint PouchDB metapackages
This commit is contained in:
6
types/pouchdb-browser/index.d.ts
vendored
6
types/pouchdb-browser/index.d.ts
vendored
@@ -1,7 +1,8 @@
|
||||
// Type definitions for pouchdb-browser v6.1.2
|
||||
// Type definitions for pouchdb-browser 6.1
|
||||
// Project: https://pouchdb.com/
|
||||
// Definitions by: Simon Paulger <https://github.com/spaulg>, Brian Geppert <https://github.com/geppy>, Frederico Galvão <https://github.com/fredgalvao>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
/// <reference types="pouchdb-core" />
|
||||
/// <reference types="pouchdb-adapter-idb" />
|
||||
@@ -10,6 +11,9 @@
|
||||
/// <reference types="pouchdb-mapreduce" />
|
||||
/// <reference types="pouchdb-replication" />
|
||||
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
/* tslint:disable:no-single-declare-module */
|
||||
|
||||
declare module 'pouchdb-browser' {
|
||||
const PouchDb: PouchDB.Static;
|
||||
export = PouchDb;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
function testConstructor() {
|
||||
type MyModel = { numericProperty: number };
|
||||
interface MyModel {
|
||||
numericProperty: number;
|
||||
}
|
||||
let model: PouchDB.Core.Document<MyModel>;
|
||||
|
||||
let db = new PouchDB<MyModel>(null, {
|
||||
|
||||
1
types/pouchdb-browser/tslint.json
Normal file
1
types/pouchdb-browser/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
6
types/pouchdb-http/index.d.ts
vendored
6
types/pouchdb-http/index.d.ts
vendored
@@ -1,11 +1,15 @@
|
||||
// Type definitions for pouchdb-http v6.1.2
|
||||
// Type definitions for pouchdb-http 6.1
|
||||
// Project: https://pouchdb.com/
|
||||
// Definitions by: Simon Paulger <https://github.com/spaulg>, Brian Geppert <https://github.com/geppy>, Frederico Galvão <https://github.com/fredgalvao>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
/// <reference types="pouchdb-core" />
|
||||
/// <reference types="pouchdb-adapter-http" />
|
||||
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
/* tslint:disable:no-single-declare-module */
|
||||
|
||||
declare module 'pouchdb-http' {
|
||||
const PouchDb: PouchDB.Static;
|
||||
export = PouchDb;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
function testConstructor() {
|
||||
type MyModel = { numericProperty: number };
|
||||
interface MyModel {
|
||||
numericProperty: number;
|
||||
}
|
||||
let model: PouchDB.Core.Document<MyModel>;
|
||||
|
||||
let db = new PouchDB<MyModel>('myDb', {
|
||||
|
||||
1
types/pouchdb-http/tslint.json
Normal file
1
types/pouchdb-http/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
6
types/pouchdb-node/index.d.ts
vendored
6
types/pouchdb-node/index.d.ts
vendored
@@ -1,7 +1,8 @@
|
||||
// Type definitions for pouchdb-node v6.1.2
|
||||
// Type definitions for pouchdb-node 6.1
|
||||
// Project: https://pouchdb.com/
|
||||
// Definitions by: Simon Paulger <https://github.com/spaulg>, Brian Geppert <https://github.com/geppy>, Frederico Galvão <https://github.com/fredgalvao>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
/// <reference types="pouchdb-core" />
|
||||
/// <reference types="pouchdb-adapter-leveldb" />
|
||||
@@ -9,6 +10,9 @@
|
||||
/// <reference types="pouchdb-mapreduce" />
|
||||
/// <reference types="pouchdb-replication" />
|
||||
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
/* tslint:disable:no-single-declare-module */
|
||||
|
||||
declare namespace PouchDB {
|
||||
namespace Core {
|
||||
interface DatabaseInfo {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
function testConstructor() {
|
||||
type MyModel = { numericProperty: number };
|
||||
interface MyModel {
|
||||
numericProperty: number;
|
||||
}
|
||||
let model: PouchDB.Core.Document<MyModel>;
|
||||
|
||||
let db = new PouchDB<MyModel>('myDb', {
|
||||
|
||||
1
types/pouchdb-node/tslint.json
Normal file
1
types/pouchdb-node/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
6
types/pouchdb/index.d.ts
vendored
6
types/pouchdb/index.d.ts
vendored
@@ -1,7 +1,8 @@
|
||||
// Type definitions for pouchdb v6.1.2
|
||||
// Type definitions for pouchdb 6.1
|
||||
// Project: https://pouchdb.com/
|
||||
// Definitions by: Andy Brown <https://github.com/AGBrown>, Brian Geppert <https://github.com/geppy>, Frederico Galvão <https://github.com/fredgalvao>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
/// <reference types='pouchdb-adapter-fruitdown' />
|
||||
/// <reference types='pouchdb-adapter-http' />
|
||||
@@ -18,6 +19,9 @@
|
||||
/// <reference types='pouchdb-node' />
|
||||
/// <reference types='pouchdb-replication' />
|
||||
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
/* tslint:disable:no-single-declare-module */
|
||||
|
||||
declare module 'pouchdb' {
|
||||
const plugin: PouchDB.Static;
|
||||
export = plugin;
|
||||
|
||||
@@ -19,7 +19,7 @@ function testAllDocs() {
|
||||
|
||||
// check document property
|
||||
isNumber(doc.foo);
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
db.allDocs({ startkey: "a", endkey: "b" });
|
||||
@@ -48,7 +48,9 @@ function testDestroy() {
|
||||
}
|
||||
|
||||
function testBasics() {
|
||||
type MyModel = { property: 'someProperty '};
|
||||
interface MyModel {
|
||||
property: 'someProperty ';
|
||||
}
|
||||
let model: PouchDB.Core.Document<MyModel>;
|
||||
const id = 'model';
|
||||
|
||||
|
||||
1
types/pouchdb/tslint.json
Normal file
1
types/pouchdb/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user