Skip to content

Commit

Permalink
chore: add export to declarations (eggjs#2344)
Browse files Browse the repository at this point in the history
  • Loading branch information
whxaxes authored and atian25 committed Apr 9, 2018
1 parent 4418841 commit 8697140
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ declare module 'egg' {
* it's instantiated in context level,
* {@link Helper}, {@link Service} is extending it.
*/
class BaseContextClass { // tslint:disable-line
export class BaseContextClass { // tslint:disable-line
/**
* request context
*/
Expand Down Expand Up @@ -63,7 +63,7 @@ declare module 'egg' {

export type RequestArrayBody = any[];
export type RequestObjectBody = PlainObject;
interface Request extends KoaApplication.Request { // tslint:disable-line
export interface Request extends KoaApplication.Request { // tslint:disable-line
/**
* detect if response should be json
* 1. url path ends with `.json`
Expand Down Expand Up @@ -145,7 +145,7 @@ declare module 'egg' {
body: any;
}

interface Response extends KoaApplication.Response { // tslint:disable-line
export interface Response extends KoaApplication.Response { // tslint:disable-line
/**
* read response real status code.
*
Expand All @@ -158,7 +158,7 @@ declare module 'egg' {
realStatus: number;
}

interface ContextView { // tslint:disable-line
export interface ContextView { // tslint:disable-line
/**
* Render a file by view engine
* @param {String} name - the file path based on root
Expand Down Expand Up @@ -431,7 +431,7 @@ declare module 'egg' {
url(name: string, params: any): any;
}

class EggApplication extends KoaApplication { // tslint:disable-line
export class EggApplication extends KoaApplication { // tslint:disable-line
/**
* The current directory of application
*/
Expand Down Expand Up @@ -550,9 +550,9 @@ declare module 'egg' {
url(name: string, params: any): any;
}

type RouterPath = string | RegExp;
export type RouterPath = string | RegExp;

class Application extends EggApplication {
export class Application extends EggApplication {
/**
* global locals for view
* @see Context#locals
Expand Down Expand Up @@ -596,7 +596,7 @@ declare module 'egg' {
Controller: Controller;
}

interface FileStream extends Readable { // tslint:disable-line
export interface FileStream extends Readable { // tslint:disable-line
fields: any;

filename: string;
Expand Down Expand Up @@ -905,12 +905,12 @@ declare module 'egg' {
}

// egg env type
type EggEnvType = 'local' | 'unittest' | 'prod' | string;
export type EggEnvType = 'local' | 'unittest' | 'prod' | string;

/**
* plugin config item
*/
interface EggPluginItem {
export interface EggPluginItem {
env?: EggEnvType[];
path?: string;
package?: string;
Expand All @@ -920,7 +920,7 @@ declare module 'egg' {
/**
* build-in plugin list
*/
interface EggPlugin {
export interface EggPlugin {
[key: string]: EggPluginItem | undefined;
onerror?: EggPluginItem;
session?: EggPluginItem;
Expand All @@ -939,7 +939,7 @@ declare module 'egg' {
/**
* Singleton instance in Agent Worker, extend {@link EggApplication}
*/
class Agent extends EggApplication {
export class Agent extends EggApplication {
}

export interface ClusterOptions {
Expand Down

0 comments on commit 8697140

Please sign in to comment.