Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lwc/engine-core

Package Overview
Dependencies
Maintainers
0
Versions
375
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lwc/engine-core - npm Package Compare versions

Comparing version 7.2.0 to 7.3.0-alpha.0

4

dist/framework/decorators/wire.d.ts

@@ -1,2 +0,2 @@

import { WireAdapterConstructor } from '../wiring';
import type { ConfigValue, ContextValue, ReplaceReactiveValues, WireAdapterConstructor, WireDecorator } from '../wiring';
/**

@@ -13,3 +13,3 @@ * Decorator factory to wire a property or method to a wire adapter data source.

*/
export default function wire(adapter: WireAdapterConstructor, config?: Record<string, any>): (value: unknown, context: ClassMemberDecoratorContext | string | symbol) => void;
export default function wire<ReactiveConfig extends ConfigValue = ConfigValue, Value = any, Context extends ContextValue = ContextValue>(adapter: WireAdapterConstructor<ReplaceReactiveValues<ReactiveConfig>, Value, Context>, config?: ReactiveConfig): WireDecorator<Value>;
export declare function internalWireFieldDecorator(key: string): PropertyDescriptor;
export { createContextProviderWithRegister, createContextWatcher } from './context';
export { ConfigCallback, ConfigValue, ContextConsumer, ContextProvider, ContextValue, DataCallback, WireAdapter, WireAdapterConstructor, WireAdapterSchemaValue, WireContextSubscriptionPayload, WireContextSubscriptionCallback, } from './types';
export { ConfigCallback, ConfigValue, ContextConsumer, ContextProvider, ContextValue, DataCallback, ReplaceReactiveValues, WireAdapter, WireAdapterConstructor, WireAdapterSchemaValue, WireContextSubscriptionPayload, WireContextSubscriptionCallback, WireDecorator, } from './types';
export { connectWireAdapters, disconnectWireAdapters, installWireAdapters, storeWiredFieldMeta, storeWiredMethodMeta, } from './wiring';

@@ -19,2 +19,22 @@ import type { LightningElement } from '../base-lightning-element';

}
/**
* The decorator returned by `@wire()`; not the `wire` factory function.
*
* If you're using `@wire(adapter) property` and getting an opaque type error, ensure that the
* property is explicitly typed and the type matches the value used by the adapter. Note that one
* of the following conditions must always be true:
* - The adapter uses `undefined` as a possible value
* - The property is marked as optional
* - The property is assigned a default value (not provided by the adapter)
*/
export interface WireDecorator<Value = any> {
/** Property decorator for `"experimentalDecorators": false`. */
<Class extends LightningElement>(target: undefined, ctx: ClassFieldDecoratorContext<Class, Value>): void;
/** Method decorator for `"experimentalDecorators": false`. */
<Class extends LightningElement>(target: DataCallback<Value>, ctx: ClassMethodDecoratorContext<Class, DataCallback<Value>>): void | DataCallback<Value>;
/** Property decorator for `"experimentalDecorators": true`. */
<K extends string | symbol>(target: Record<K, Value>, propertyKey: K): void;
/** Method decorator for `"experimentalDecorators": true`. */
<K extends string | symbol>(target: Record<K, DataCallback<Value>>, propertyKey: K, descriptor: TypedPropertyDescriptor<DataCallback<Value>>): void;
}
export interface WireDef {

@@ -53,1 +73,9 @@ method?: (data: any) => void;

export type RegisterContextProviderFn = (element: HostElement, adapterContextToken: string, onContextSubscription: WireContextSubscriptionCallback) => void;
/**
* String values starting with "$" are reactive; they get replaced by values from the component.
* We don't have access to the component, and we don't expect all reactive strings to be typed as
* literals, so we just replace all strings with `any`.
*/
export type ReplaceReactiveValues<T> = {
[K in keyof T]: T[K] extends string ? any : T[K];
};

@@ -7,3 +7,3 @@ {

"name": "@lwc/engine-core",
"version": "7.2.0",
"version": "7.3.0-alpha.0",
"description": "Core LWC engine APIs.",

@@ -46,5 +46,5 @@ "keywords": [

"dependencies": {
"@lwc/features": "7.2.0",
"@lwc/shared": "7.2.0",
"@lwc/signals": "7.2.0"
"@lwc/features": "7.3.0-alpha.0",
"@lwc/shared": "7.3.0-alpha.0",
"@lwc/signals": "7.3.0-alpha.0"
},

@@ -54,2 +54,2 @@ "devDependencies": {

}
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc