feat: Add extension storage (#2069)

This commit is contained in:
Philipp Kühn
2021-10-22 08:52:54 +02:00
committed by GitHub
parent 6987505fda
commit 7ffabf251c
26 changed files with 555 additions and 105 deletions

View File

@@ -1,9 +1,9 @@
import { AnyExtension, RemoveThis } from '../types'
import { AnyExtension, RemoveThis, MaybeThisParameterType } from '../types'
export default function getExtensionField<T = any>(
extension: AnyExtension,
field: string,
context: Record<string, any> = {},
context?: Omit<MaybeThisParameterType<T>, 'parent'>,
): RemoveThis<T> {
if (extension.config[field] === undefined && extension.parent) {