Update and lint PouchDB metapackages

This commit is contained in:
Max Battcher
2017-06-08 14:55:10 -04:00
parent 1493b8762b
commit fe564f6dcf
12 changed files with 37 additions and 9 deletions

View File

@@ -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;

View File

@@ -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, {

View File

@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

View File

@@ -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;

View File

@@ -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', {

View File

@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

View File

@@ -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 {

View File

@@ -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', {

View File

@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

View File

@@ -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;

View File

@@ -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';

View File

@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }