Skip to content

Commit 5b344da

Browse files
fix: addTrustedContext alias
1 parent 05ce902 commit 5b344da

File tree

6 files changed

+9
-13
lines changed

6 files changed

+9
-13
lines changed

packages/@lwc/engine-core/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,6 @@ Not intended for external use. This experimental API enables the addition of con
132132

133133
If `setTrustedContextSet` is called more than once, it will throw an error. If it is never called, then context will not be connected.
134134

135-
### addTrustedContext()
136-
137-
Not intended for external use. This experimental API adds trusted context that will be bound to an associated component lifecycle via `ContextBinding` for provision/consumption. The [ENABLE_EXPERIMENTAL_SIGNALS](https://github.com/salesforce/lwc/blob/master/packages/%40lwc/features/README.md#lwcfeatures) feature must be enabled.
138-
139135
### ContextBinding
140136

141137
The context object's `connectContext` and `disconnectContext` methods are called with this object when contextful components are connected and disconnected. The ContextBinding exposes `provideContext` and `consumeContext`,

packages/@lwc/engine-dom/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export {
3333
setContextKeys,
3434
setTrustedSignalSet,
3535
setTrustedContextSet,
36-
addTrustedContext,
36+
addTrustedContext as __dangerous_do_not_use_addTrustedContext,
3737
swapComponent,
3838
swapStyle,
3939
swapTemplate,

packages/@lwc/engine-server/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export {
3030
parseFragment,
3131
parseFragment as parseSVGFragment,
3232
setTrustedContextSet,
33-
addTrustedContext,
33+
addTrustedContext as __dangerous_do_not_use_addTrustedContext,
3434
setContextKeys,
3535
} from '@lwc/engine-core';
3636

packages/@lwc/integration-karma/test-hydration/context/x/contextManager/contextManager.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
import { setContextKeys, setTrustedContextSet, addTrustedContext } from 'lwc';
1+
import {
2+
setContextKeys,
3+
setTrustedContextSet,
4+
__dangerous_do_not_use_addTrustedContext,
5+
} from 'lwc';
26

37
const connectContext = Symbol('connectContext');
48
const disconnectContext = Symbol('disconnectContext');
@@ -16,7 +20,7 @@ class MockContextSignal {
1620
this.value = initialValue;
1721
this.contextDefinition = contextDefinition;
1822
this.fromContext = fromContext;
19-
addTrustedContext(this);
23+
__dangerous_do_not_use_addTrustedContext(this);
2024
}
2125
[connectContext](runtimeAdapter) {
2226
this.connectProvidedComponent = runtimeAdapter.component;

packages/@lwc/ssr-runtime/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export {
1717
setContextKeys,
1818
setTrustedSignalSet,
1919
setTrustedContextSet,
20-
addTrustedContext,
20+
addTrustedContext as __dangerous_do_not_use_addTrustedContext,
2121
} from '@lwc/shared';
2222

2323
export { setFeatureFlag, setFeatureFlagForTest } from '@lwc/features';

packages/lwc/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,6 @@ Not intended for external use. This experimental API enables the addition of con
9898

9999
If `setTrustedContextSet` is called more than once, it will throw an error. If it is never called, then context will not be connected.
100100

101-
### addTrustedContext()
102-
103-
Not intended for external use. This experimental API adds trusted context that will be bound to an associated component lifecycle via `ContextBinding` for provision/consumption. The [ENABLE_EXPERIMENTAL_SIGNALS](https://github.com/salesforce/lwc/blob/master/packages/%40lwc/features/README.md#lwcfeatures) feature must be enabled.
104-
105101
### ContextBinding
106102

107103
The context object's `connectContext` and `disconnectContext` methods are called with this object when contextful components are connected and disconnected. The ContextBinding exposes `provideContext` and `consumeContext`,

0 commit comments

Comments
 (0)