🤖 Merge PR #41323 [cassandra-store] Create declaration file by @QuangDuong120198

* Declaration file for cassandra-store

* Remove @types/express and @types/express-session
This commit is contained in:
Ngô Quang Dương 2020-01-03 01:00:09 +07:00 committed by TypeScript Bot
parent 5d5716a9c3
commit bbeec088c3
4 changed files with 68 additions and 0 deletions

37
types/cassandra-store/index.d.ts vendored Normal file
View File

@ -0,0 +1,37 @@
// Type definitions for cassandra-store 5.0
// Project: https://github.com/webcc/cassandra-store
// Definitions by: Ngo Quang Duong <https://github.com/QuangDuong120198>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.7
/// <reference types="express" />
import { Store } from 'express-session';
import { ClientOptions, Client, EmptyCallback } from 'cassandra-driver';
interface CassandraStoreOptions {
table: string;
clientOptions: ClientOptions;
client?: Client | null;
}
export = CassandraStore;
declare class CassandraStore extends Store {
private _client: Client;
private _clientOptions: ClientOptions;
constructor(opts: CassandraStoreOptions, callback?: EmptyCallback);
get client(): Client;
set client(value: Client);
get clientOptions(): ClientOptions;
set clientOptions(value: ClientOptions);
get table(): string;
set table(value: string);
}

View File

@ -0,0 +1,6 @@
{
"private": true,
"dependencies": {
"cassandra-driver": "^4.3.0"
}
}

View File

@ -0,0 +1,22 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts"
]
}

View File

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