egg-core
Advanced tools
Comparing version 4.16.0 to 4.16.1
4.16.1 / 2019-03-20 | ||
================== | ||
**fixes** | ||
* [[`6bbbca2`](http://github.com/eggjs/egg-core/commit/6bbbca275f6573f125979fa215fea62285be201d)] - fix: change non-exports type to interface (#206) (吖猩 <<whxaxes@qq.com>>) | ||
4.16.0 / 2019-03-19 | ||
@@ -3,0 +9,0 @@ ================== |
@@ -56,3 +56,3 @@ import KoaApplication = require('koa'); | ||
export class EggCore<Config = PlainObject> extends KoaApplication { | ||
export interface EggCoreBase<Config> extends KoaApplication { | ||
/** | ||
@@ -82,12 +82,2 @@ * Whether `application` or `agent` | ||
/** | ||
* @constructor | ||
* @param {Object} options - options | ||
* @param {String} [options.baseDir=process.cwd()] - the directory of application | ||
* @param {String} [options.type=application|agent] - whether it's running in app worker or agent worker | ||
* @param {Object} [options.plugins] - custom plugins | ||
* @since 1.0.0 | ||
*/ | ||
constructor(options?: EggCoreOptions); | ||
/** | ||
* Convert a generator function to a promisable one. | ||
@@ -212,3 +202,5 @@ * | ||
deprecate: depd.Deprecate; | ||
} | ||
export interface EggCore<Config = PlainObject> extends EggCoreBase<Config> { | ||
Controller: typeof BaseContextClass; | ||
@@ -218,2 +210,14 @@ Service: typeof BaseContextClass; | ||
export class EggCore { | ||
/** | ||
* @constructor | ||
* @param {Object} options - options | ||
* @param {String} [options.baseDir=process.cwd()] - the directory of application | ||
* @param {String} [options.type=application|agent] - whether it's running in app worker or agent worker | ||
* @param {Object} [options.plugins] - custom plugins | ||
* @since 1.0.0 | ||
*/ | ||
constructor(options?: EggCoreOptions); | ||
} | ||
/** | ||
@@ -308,10 +312,4 @@ * egg app info | ||
declare class FileLoader { | ||
declare interface FileLoaderBase { | ||
/** | ||
* Load files from directory to target object. | ||
* @since 1.0.0 | ||
*/ | ||
constructor(options: FileLoaderOption); | ||
/** | ||
* attach items to target object. Mapping the directory to properties. | ||
@@ -353,4 +351,14 @@ * `app/controller/group/repository.js` => `target.group.repository` | ||
declare class ContextLoader extends FileLoader { | ||
declare interface ContextLoaderBase extends FileLoaderBase {} | ||
export interface FileLoader { | ||
/** | ||
* Load files from directory to target object. | ||
* @since 1.0.0 | ||
*/ | ||
new (options: FileLoaderOption): FileLoaderBase; | ||
} | ||
export interface ContextLoader { | ||
/** | ||
* Same as {@link FileLoader}, but it will attach file to `inject[fieldClass]`. The exports will be lazy loaded, such as `ctx.group.repository`. | ||
@@ -360,3 +368,3 @@ * @extends FileLoader | ||
*/ | ||
constructor(options: ContextLoaderOption); | ||
new (options: ContextLoaderOption): ContextLoaderBase; | ||
} | ||
@@ -452,4 +460,4 @@ | ||
FileLoader: typeof FileLoader; | ||
ContextLoader: typeof ContextLoader; | ||
FileLoader: FileLoader; | ||
ContextLoader: ContextLoader; | ||
@@ -456,0 +464,0 @@ // load methods |
{ | ||
"name": "egg-core", | ||
"version": "4.16.0", | ||
"version": "4.16.1", | ||
"description": "A core Pluggable framework based on koa", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
121894
2895
1