mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 20:39:17 +08:00
* Added missing nconf.required(keys) and Provider.required(keys) methods. * update to 4.7.0, add querycursor.map() and schema.loadClass() * add error callback for schema.post() * Added playsInline property as introduced in React 15.3.2 * Add definitions for redux-localstorage and main enhancers (#12580) * Add definitions for redux-localstorage * Add definitions for redux-localstorage-filter enhancer * Add definitions for redux-localstorage-debounce enhancer * csurf.d.ts relying on CookieOptions from express It seems express no longer exports `CookieOptions`, we need to import `express-serve-static-core` instead. * Added height property to IDialogOptions * versionKey type * kendo-ui: mark toString() params as optional (#13164) These function parameters are optional according to the upstream docs, e.g. http://docs.telerik.com/kendo-ui/api/javascript/geometry/matrix#methods-toString * Ensure that zoneAbbr and zoneName are expected type (string). * Update moment-timezone.d.ts * Fix syntax error in interact.d.ts A parameter name was missing making TypeScript compiler fail. * adding type for move to fs-extra * fixing signature of sinon/alwaysReturned based on the http://sinonjs.org/docs/#sinonspy * increasing version number * returning back the version number to the origin number * reversing changes in fs-extra * Request that PRs have meaningful titles * Improvement to existing nouislider type definition. (#12033) * updated nouislider version and added a lot of tests out of the documentation * corrected intentation * corrected untyped variables, issue raised by Travis * incorporated feedback on pull request * #13037 (#13039) * #13037 * pointToLayer first argument type fixed GeoJSON.Point to GeoJSON.Feature<GeoJSON.Point> * Missing cc in sendgrid packate (#13063) The sendgrid package was missing the `cc` field, and the `bcc` field had a too generic type (`any` instead of `string[]`, as used on the `setCcs` and `setBccs` below. * Fixes #12414 (#13076) * Fixes #12414 * Make applicationServerKey optional * added ariaLabelledBy and ariaDescribedBy to IModalSettings (#13004) * Ceymard leaflet (#13007) * replaced all overrides of LatLng by a single use of LatLngExpression when appropriate * Changed Point, PointTuple overrides to use PointExpression instead * Changet use of LatLngBounds and Bounds in general to use the Expression variant instead of having several overrides * add ElasticSeach 5.x API function for deleteByQuery (#13014) * add ElasticSeach 5.x API function for deleteByQuery * use searchParams for deleteByQuery, as theses resemble the documentation. * add DeleteByQueryParams parameter type. * add deleteByQuery to tests. * Make `less` render options optional (#13078) * Added semver * Updated gravity definition. (#13088) * Full Redis client options (#13108) * Added missing return type to on() methods. (#13082) * Update react-native.0.29.d.ts (#13118) drawerPosition is of type `number` Android DrawerConsts.DrawerPosition.Left is equivalent to DrawerLayoutAndroid.positions.Left Android DrawerConsts.DrawerPosition.Right is equivalent to DrawerLayoutAndroid.positions.Right * Upgrade to match braintree-web 3.6.1 (#13098) * Update to match braintree-web version 3.3.0 * Upgrade to match Braintree-web v3.5.0 * upgrade to match braintree-web 3.6.1 add US bank class * Fix missing parameters from svg append (#13119) * Add parameter declarations to append() * Made insertFirst parameter optional * Correct missing ‘auto’ option of GridList’s cellHeight (#13094) * Add new Angular 1.5.9 methods to $compileProvider (#13096) * Add new Angular 1.5.9 methods to $compileProvider Add new methods available in Angular 1.5.9: onChangesTtl(), commentDirectivesEnabled() and cssClassDirectivesEnabled() * Add JSDoc to Angular 1.59 new methods of $compileProvider JSDoc for onChangesTtl(), commentDirectivesEnabled() and cssClassDirectivesEnabled() methods. * Expand $compileProvider JSDoc Urls added to JSDoc of Angular 1.5.9 new methods . * Changed type of injectedScript property to string (#13120) The injectedScript property should take string value with script code, not the bool flag as in current version * Use unions for openlayers string enums (#13134) * Update google.maps.MapPane interface (#13122) * Removing myself (AlStar01) as definition author from angular-material.d.ts (#13125) * Clarify that notNeededPackages.json is just for packages formerly on DefinitelyTyped (#13156) * Update Parsimmon typings (#13146) * Update AmCharts.d.ts (#13170) * knex: add MySqlConnectionConfig, tests (#13161) * knex: add MySqlConnectionConfig, tests * knex: add types for MySqlConnectionConfig queryFormat params * Add note in readme about tsjs-lib-generator (#13210) * Remove redux-localstorage packages; added by #13115 instead
130 lines
2.7 KiB
TypeScript
130 lines
2.7 KiB
TypeScript
|
|
import nconf = require('nconf');
|
|
|
|
var value: any;
|
|
var num: number;
|
|
var bool: boolean;
|
|
var valueArr: any[];
|
|
var str: string;
|
|
var strArr: string[];
|
|
var p: nconf.Provider;
|
|
var opts: nconf.IOptions;
|
|
var fopts: nconf.IFileOptions;
|
|
var store: nconf.IStore;
|
|
var callback: (err: Error) => void;
|
|
var fmt: nconf.IFormat;
|
|
|
|
value = nconf.clear(str, callback);
|
|
value = nconf.get (str, callback);
|
|
value = nconf.merge(str, value, callback);
|
|
value = nconf.set (str, value, callback);
|
|
value = nconf.reset(callback);
|
|
|
|
value = nconf.load(callback);
|
|
nconf.mergeSources(value);
|
|
value = nconf.loadSources();
|
|
value = nconf.save(value, callback);
|
|
|
|
p = nconf.add(str);
|
|
p = nconf.add(str, opts);;
|
|
|
|
p = nconf.argv();
|
|
p = nconf.argv(opts);
|
|
|
|
p = nconf.env();
|
|
p = nconf.env(opts);
|
|
|
|
p = nconf.file(str);
|
|
p = nconf.file(str, str);
|
|
p = nconf.file(str, fopts);
|
|
p = nconf.file(fopts);
|
|
p = nconf.file({
|
|
format: fmt,
|
|
file: 'jsonFile.custom'
|
|
});
|
|
p = nconf.use(str);
|
|
p = nconf.use(str, opts);
|
|
|
|
p = nconf.defaults();
|
|
p = nconf.defaults(opts);
|
|
|
|
p = nconf.defaults({foo: 'bar'});
|
|
|
|
nconf.init();
|
|
nconf.init(opts);
|
|
|
|
p = nconf.overrides();
|
|
p = nconf.overrides(opts);
|
|
nconf.remove(str);
|
|
bool = nconf.required(strArr);
|
|
store = nconf.create(str, opts);
|
|
|
|
str = nconf.key(value, value);
|
|
valueArr = nconf.path(value);
|
|
nconf.loadFiles(value, callback);
|
|
nconf.loadFilesSync(value, callback);
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
str = store.type;
|
|
value = store.get(str);
|
|
bool = store.set(str, value);
|
|
bool = store.clear(str);
|
|
bool = store.merge(str, value);
|
|
bool = store.reset(callback);
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
p = new nconf.Provider(opts);
|
|
value = p.stores;
|
|
valueArr = p.sources;
|
|
|
|
value = p.clear(str, callback);
|
|
value = p.get(str, callback);
|
|
value = p.merge(str,value,callback);
|
|
value = p.set(str,value,callback);
|
|
value = p.reset(callback);
|
|
|
|
value = p.load(callback);
|
|
p.mergeSources(value);
|
|
value = p.loadSources();
|
|
value = p.save(value, callback);
|
|
|
|
p = p.add(str);
|
|
p = p.add(str, opts);
|
|
p = p.argv();
|
|
p = p.argv(opts);
|
|
p = p.env();
|
|
p = p.env(opts);
|
|
p = p.file(str);
|
|
p = p.file(str, str);
|
|
p = p.file(str, fopts);
|
|
p = p.file(fopts);
|
|
p = p.file({
|
|
file: 'iniFile.ini',
|
|
format: nconf.formats.ini
|
|
});
|
|
p = p.file({
|
|
file: 'jsonFile.json',
|
|
format: nconf.formats.json
|
|
});
|
|
p = p.file({
|
|
file: 'jsonFile.custom',
|
|
format: fmt
|
|
});
|
|
p = p.use(str, opts);
|
|
|
|
p = p.defaults(opts);
|
|
p.init(opts);
|
|
p = p.overrides(opts);
|
|
p.remove(str);
|
|
bool = p.required(strArr);
|
|
store = p.create(str, opts);
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
class CustomFmt implements nconf.IFormat {
|
|
stringify(obj: any, replacer: any, spacing?: any): string { return ""; }
|
|
parse(str: string): any { return {} }
|
|
};
|