mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
More fixes for 2.4. Not all for weak types:
2.4 also has been inference for generics, which finds more errors as well.
This commit is contained in:
Vendored
+4
@@ -1846,6 +1846,10 @@ declare namespace angular {
|
||||
* different in Angular 1 there is no direct mapping and care should be taken when upgrading.
|
||||
*/
|
||||
$postLink?(): void;
|
||||
|
||||
// IController implementations frequently do not implement any of its methods.
|
||||
// A string indexer indicates to TypeScript not to issue a weak type error in this case.
|
||||
[s: string]: any;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Vendored
+21
-12
@@ -36,13 +36,22 @@ interface FileOptions {
|
||||
// for each file in a bundle.
|
||||
type InputFile = string | NodeJS.ReadableStream | FileOptions;
|
||||
|
||||
/**
|
||||
* Core options pertaining to a Browserify instance, extended by user options
|
||||
*/
|
||||
interface CustomOptions {
|
||||
/**
|
||||
* Custom properties can be defined on Options.
|
||||
* These options are forwarded along to module-deps and browser-pack directly.
|
||||
*/
|
||||
[propName: string]: any;
|
||||
/** the directory that Browserify starts bundling from for filenames that start with .. */
|
||||
basedir?: string;
|
||||
}
|
||||
/**
|
||||
* Options pertaining to a Browserify instance.
|
||||
*/
|
||||
interface Options {
|
||||
// Custom properties can be defined on Options.
|
||||
// These options are forwarded along to module-deps and browser-pack directly.
|
||||
[propName: string]: any;
|
||||
interface Options extends CustomOptions {
|
||||
// String, file object, or array of those types (they may be mixed) specifying entry file(s).
|
||||
entries?: InputFile | InputFile[];
|
||||
// an array which will skip all require() and global parsing for each file in the array.
|
||||
@@ -115,32 +124,32 @@ interface BrowserifyObject extends NodeJS.EventEmitter {
|
||||
* If file is an array, each item in file will be externalized.
|
||||
* If file is another bundle, that bundle's contents will be read and excluded from the current bundle as the bundle in file gets bundled.
|
||||
*/
|
||||
external(file: string[], opts?: { basedir?: string }): BrowserifyObject;
|
||||
external(file: string, opts?: { basedir?: string }): BrowserifyObject;
|
||||
external(file: string[], opts?: CustomOptions): BrowserifyObject;
|
||||
external(file: string, opts?: CustomOptions): BrowserifyObject;
|
||||
external(file: BrowserifyObject): BrowserifyObject;
|
||||
/**
|
||||
* Prevent the module name or file at file from showing up in the output bundle.
|
||||
* Instead you will get a file with module.exports = {}.
|
||||
*/
|
||||
ignore(file: string, opts?: { basedir?: string }): BrowserifyObject;
|
||||
ignore(file: string, opts?: CustomOptions): BrowserifyObject;
|
||||
/**
|
||||
* Prevent the module name or file at file from showing up in the output bundle.
|
||||
* If your code tries to require() that file it will throw unless you've provided another mechanism for loading it.
|
||||
*/
|
||||
exclude(file: string, opts?: { basedir?: string }): BrowserifyObject;
|
||||
exclude(file: string, opts?: CustomOptions): BrowserifyObject;
|
||||
/**
|
||||
* Transform source code before parsing it for require() calls with the transform function or module name tr.
|
||||
* If tr is a function, it will be called with tr(file) and it should return a through-stream that takes the raw file contents and produces the transformed source.
|
||||
* If tr is a string, it should be a module name or file path of a transform module
|
||||
*/
|
||||
transform<T extends { basedir?: string }>(tr: string, opts?: T): BrowserifyObject;
|
||||
transform<T extends { basedir?: string }>(tr: (file: string, opts: T) => NodeJS.ReadWriteStream, opts?: T): BrowserifyObject;
|
||||
transform<T extends CustomOptions>(tr: string, opts?: T): BrowserifyObject;
|
||||
transform<T extends CustomOptions>(tr: (file: string, opts: T) => NodeJS.ReadWriteStream, opts?: T): BrowserifyObject;
|
||||
/**
|
||||
* Register a plugin with opts. Plugins can be a string module name or a function the same as transforms.
|
||||
* plugin(b, opts) is called with the Browserify instance b.
|
||||
*/
|
||||
plugin<T extends { basedir?: string }>(plugin: string, opts?: T): BrowserifyObject;
|
||||
plugin<T extends { basedir?: string }>(plugin: (b: BrowserifyObject, opts: T) => any, opts?: T): BrowserifyObject;
|
||||
plugin<T extends CustomOptions>(plugin: string, opts?: T): BrowserifyObject;
|
||||
plugin<T extends CustomOptions>(plugin: (b: BrowserifyObject, opts: T) => any, opts?: T): BrowserifyObject;
|
||||
/**
|
||||
* Reset the pipeline back to a normal state. This function is called automatically when bundle() is called multiple times.
|
||||
* This function triggers a 'reset' event.
|
||||
|
||||
Vendored
+18
-1
@@ -7,6 +7,23 @@
|
||||
|
||||
declare module "bunyan-config" {
|
||||
import * as bunyan from "bunyan";
|
||||
interface StreamConfiguration {
|
||||
name: string,
|
||||
params?: {
|
||||
host: string,
|
||||
port: number
|
||||
}
|
||||
}
|
||||
|
||||
interface Stream {
|
||||
type?: string;
|
||||
level?: bunyan.LogLevel;
|
||||
path?: string;
|
||||
stream?: string | StreamConfiguration
|
||||
closeOnExit?: boolean;
|
||||
period?: string;
|
||||
count?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configuration.
|
||||
@@ -14,7 +31,7 @@ declare module "bunyan-config" {
|
||||
*/
|
||||
interface Configuration {
|
||||
name: string;
|
||||
streams?: bunyan.Stream[];
|
||||
streams?: Stream[];
|
||||
level?: string | number;
|
||||
stream?: NodeJS.WritableStream;
|
||||
serializers?: {};
|
||||
|
||||
@@ -124,15 +124,5 @@ server.route([{
|
||||
}
|
||||
}]);
|
||||
|
||||
// Implict handler
|
||||
server.route({
|
||||
method: 'GET',
|
||||
path: '/hello6',
|
||||
handler: function (request, reply) {
|
||||
request.log('info', { route: '/hello' }, Date.now());
|
||||
reply('hello world');
|
||||
}
|
||||
});
|
||||
|
||||
// Start the server
|
||||
server.start();
|
||||
|
||||
@@ -30,7 +30,7 @@ User.find(1).then(function (user:IUser) {
|
||||
var user:IUser = User.createInstance({name: 'John'});
|
||||
|
||||
var store = new JSData.DS();
|
||||
var User2 = store.defineResource('user');
|
||||
var User2 = store.defineResource<IUser>('user');
|
||||
var user:IUser = User2.inject({id: 1, name: 'John'});
|
||||
var user2:IUser = User2.inject({id: 1, age: 30});
|
||||
|
||||
|
||||
Vendored
+1
@@ -3130,6 +3130,7 @@ declare namespace sequelize {
|
||||
*/
|
||||
include?: Array<Model<any, any> | IncludeOptions>;
|
||||
|
||||
all?: boolean | string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -904,7 +904,6 @@ User.findOne( { where : { id : 1 }, attributes : ['id', ['username', 'name']] }
|
||||
User.findOne( { where : { id : 1 }, attributes : ['id'] } );
|
||||
User.findOne( { where : { username : 'foo' }, logging : function( ) { } } );
|
||||
User.findOne( { limit : 10 } );
|
||||
User.findOne( { include : [1] } );
|
||||
User.findOne( { where : { title : 'homework' }, include : [User] } );
|
||||
User.findOne( { where : { name : 'environment' }, include : [{ model : User, as : 'PrivateDomain' }] } );
|
||||
User.findOne( { where : { username : 'foo' }, transaction : t } ).then( ( p ) => p );
|
||||
|
||||
Reference in New Issue
Block a user