@cordisjs/core
Advanced tools
Comparing version 3.13.6 to 3.14.0
@@ -1,2 +0,2 @@ | ||
import { Awaitable, Promisify, Dict } from 'cosmokit'; | ||
import { Awaitable, Dict, Promisify } from 'cosmokit'; | ||
export abstract class Service<T = unknown, C extends Context = Context> { | ||
@@ -58,2 +58,3 @@ static readonly setup: unique symbol; | ||
inject?: string[] | Inject; | ||
intercept?: Dict<boolean>; | ||
} | ||
@@ -301,5 +302,2 @@ interface Transform<S, T> { | ||
} | ||
type Associate<P extends string, C extends Context = Context> = { | ||
[K in keyof C as K extends `${P}.${infer R}` ? R : never]: C[K]; | ||
}; | ||
} | ||
@@ -306,0 +304,0 @@ export interface Intercept<C extends Context = Context> { |
{ | ||
"name": "@cordisjs/core", | ||
"description": "Meta-Framework for Modern JavaScript Applications", | ||
"version": "3.13.6", | ||
"version": "3.14.0", | ||
"sideEffects": false, | ||
@@ -6,0 +6,0 @@ "type": "module", |
@@ -36,6 +36,2 @@ import { defineProperty, Dict, isNullable } from 'cosmokit' | ||
} | ||
export type Associate<P extends string, C extends Context = Context> = { | ||
[K in keyof C as K extends `${P}.${infer R}` ? R : never]: C[K] | ||
} | ||
} | ||
@@ -152,3 +148,3 @@ | ||
get(target, key, receiver) { | ||
if (typeof key === 'symbol' || key in target) return Reflect.get(target, key, receiver) | ||
if (typeof key === 'symbol') return Reflect.get(target, key, receiver) | ||
const caller: Context = receiver[symbols.origin] | ||
@@ -159,3 +155,3 @@ if (!caller?.[symbols.internal][`${name}.${key}`]) return Reflect.get(target, key, receiver) | ||
set(target, key, value, receiver) { | ||
if (typeof key === 'symbol' || key in target) return Reflect.set(target, key, value, receiver) | ||
if (typeof key === 'symbol') return Reflect.set(target, key, value, receiver) | ||
const caller: Context = receiver[symbols.origin] | ||
@@ -162,0 +158,0 @@ if (!caller?.[symbols.internal][`${name}.${key}`]) return Reflect.set(target, key, value, receiver) |
@@ -1,2 +0,2 @@ | ||
import { defineProperty } from 'cosmokit' | ||
import { Dict, defineProperty } from 'cosmokit' | ||
import { Context } from './context.ts' | ||
@@ -27,2 +27,3 @@ import { ForkScope, MainScope } from './scope.ts' | ||
inject?: string[] | Inject | ||
intercept?: Dict<boolean> | ||
} | ||
@@ -29,0 +30,0 @@ |
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
201043
3636