@nuxt/types
Advanced tools
Comparing version 0.1.1 to 0.2.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [0.2.0](https://github.com/nuxt/typescript/compare/@nuxt/types@0.1.1...@nuxt/types@0.2.0) (2019-08-08) | ||
### Features | ||
* Module & ServerMiddleware types ([3d9e1e1](https://github.com/nuxt/typescript/commit/3d9e1e1)) | ||
## [0.1.1](https://github.com/nuxt/typescript/compare/@nuxt/types@0.1.0...@nuxt/types@0.1.1) (2019-08-07) | ||
@@ -8,0 +19,0 @@ |
@@ -10,3 +10,3 @@ import { Transition } from '../app' | ||
import { NuxtConfigurationLoading, NuxtConfigurationLoadingIndicator } from './loading' | ||
import { NuxtConfigurationModule } from './module' | ||
import { NuxtConfigurationModule, Module } from './module' | ||
import { NuxtConfigurationPlugin } from './plugin' | ||
@@ -16,3 +16,3 @@ import { NuxtConfigurationRender } from './render' | ||
import { NuxtConfigurationServer } from './server' | ||
import { NuxtConfigurationServerMiddleware } from './server-middleware' | ||
import { NuxtConfigurationServerMiddleware, ServerMiddleware } from './server-middleware' | ||
import { NuxtConfigurationVueConfiguration } from './vue-configuration' | ||
@@ -58,1 +58,6 @@ import { NuxtConfigurationWatchers } from './watchers' | ||
} | ||
export { | ||
Module, | ||
ServerMiddleware | ||
} |
@@ -7,4 +7,12 @@ /** | ||
type NuxtConfigurationModuleFunction = (this: any, moduleOptions?: { [key: string]: any }) => Promise<void> | void // this, this.options & this.nuxt TBD | ||
import { Configuration } from '.' | ||
export type NuxtConfigurationModule = string | [string, { [key: string]: any }] | NuxtConfigurationModuleFunction | ||
interface ModuleThis { | ||
options: Configuration | ||
nuxt: any // TBD | ||
[key: string]: any // TBD | ||
} | ||
export type Module<T = Record<string, any>> = (this: ModuleThis, moduleOptions?: T) => Promise<void> | void | ||
export type NuxtConfigurationModule = string | [string, { [key: string]: any }] | Module |
@@ -8,2 +8,4 @@ /** | ||
export type NuxtConfigurationServerMiddleware = string | { path: string, handler: string | Function } | RequestHandler | ||
export type ServerMiddleware = RequestHandler | ||
export type NuxtConfigurationServerMiddleware = string | { path: string, handler: string | Function } | ServerMiddleware |
import './process' | ||
export { Context, Middleware, Plugin, Transition } from './app' | ||
export { Configuration } from './config' | ||
export { Configuration, Module, ServerMiddleware } from './config' |
{ | ||
"name": "@nuxt/types", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"description": "Nuxt.js types", | ||
@@ -5,0 +5,0 @@ "repository": "nuxt/typescript", |
20126
483