Comparing version 2.3.0 to 2.3.1
@@ -51,2 +51,3 @@ import { Awaitable, Promisify } from 'cosmokit'; | ||
collect(label: string, callback: () => boolean): () => boolean; | ||
accept(callback?: (config: any) => void | boolean): () => boolean; | ||
accept(keys: string[], callback?: (config: any) => void | boolean): () => boolean; | ||
@@ -56,3 +57,3 @@ } | ||
export interface Acceptor { | ||
keys: string[]; | ||
keys?: string[]; | ||
callback?: (config: any) => void | boolean; | ||
@@ -78,2 +79,3 @@ } | ||
clear(preserve?: boolean): void; | ||
accept(callback?: (config: any) => void | boolean): () => boolean; | ||
accept(keys: string[], callback?: (config: any) => void | boolean): () => boolean; | ||
@@ -80,0 +82,0 @@ diff(resolved: any): boolean; |
{ | ||
"name": "cordis", | ||
"description": "AOP Framework for Modern JavaScript Applications", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"main": "lib/index.cjs", | ||
@@ -6,0 +6,0 @@ "module": "lib/index.mjs", |
@@ -38,3 +38,3 @@ # Cordis | ||
- [Write disposable methods](#write-disposable-methods-) | ||
- [Service scopes](#service-scopes-) | ||
- [Service isolation](#service-isolation-) | ||
- [Context](#context-) | ||
@@ -512,4 +512,6 @@ - [Services and mixins](#services-and-mixins-) | ||
#### Service scopes [↑](#contents) | ||
#### Service isolation [↑](#contents) | ||
> Note: this is an experimental API and may be changed in the future. | ||
By default, a service is available in all contexts. Below is an example: | ||
@@ -544,3 +546,3 @@ | ||
> Note: there is an edge case when using service scopes, service dependencies and `fork` events at the same time. Forks from a partially reusable plugin are **not** responsive to isolated service changes, because it may cause unexpected reloading across forks. If you want to write reusable plugin with service dependencies, just use `reusable` property instead of listening to `fork` event. | ||
> Note: there is an edge case when using service isolation, service dependencies and `fork` events at the same time. Forks from a partially reusable plugin are **not** responsive to isolated service changes, because it may cause unexpected reloading across forks. If you want to write reusable plugin with service dependencies, just use `reusable` property instead of listening to `fork` event. | ||
@@ -580,3 +582,3 @@ ### Context [↑](#contents) | ||
Mixins from services will still support service features such as [disposable](#write-disposable-methods-) and [isolation](#service-scopes-). | ||
Mixins from services will still support service features such as [disposable](#write-disposable-methods-) and [isolation](#service-isolation-). | ||
@@ -596,2 +598,4 @@ ## API | ||
> Note: this is an experimental API and may be changed in the future. | ||
- keys: `string[]` service names | ||
@@ -602,3 +606,3 @@ - returns: `Context` | ||
See: [Service scopes](#service-scopes-) | ||
See: [Service isolation](#service-isolation-) | ||
@@ -605,0 +609,0 @@ ### Events |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
160185
1468
792