Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Varixo committed Aug 18, 2024
1 parent 82b7d17 commit 7295bec
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
12 changes: 9 additions & 3 deletions packages/qwik/src/core/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,14 @@ export { DomContainer as _DomContainer }
// @public (undocumented)
export type EagernessOptions = 'visible' | 'load' | 'idle';

// Warning: (ae-forgotten-export) The symbol "Task" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "ISsrNode" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "Signal2_2" needs to be exported by the entry point index.d.ts
// Warning: (ae-internal-missing-underscore) The name "Effect" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export type Effect = Task | _VNode | ISsrNode | Signal2_2;

// @internal (undocumented)
export type _ElementVNode = [
_VNodeFlags.Element,
Expand Down Expand Up @@ -1124,10 +1132,8 @@ export abstract class _SharedContainer implements Container2 {
abstract setContext<T>(host: HostElement, context: ContextId<T>, value: T): void;
// (undocumented)
abstract setHostProp<T>(host: HostElement, name: string, value: T): void;
// Warning: (ae-forgotten-export) The symbol "Effect" needs to be exported by the entry point index.d.ts
//
// (undocumented)
trackSignalValue<T>(signal: Signal, subscriber: Effect, property: string): T;
trackSignalValue<T>(signal: Signal, subscriber: Effect, property: string, data: any): T;
}

// @public
Expand Down
9 changes: 2 additions & 7 deletions packages/qwik/src/core/v2/shared/shared-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { ContextId } from '../../use/use-context';
import { trackSignal2 } from '../../use/use-core';
import type { ValueOrPromise } from '../../util/types';
import { version } from '../../version';
import type { EffectSubscriptions, EffectSubscriptionsProp } from '../signal/v2-signal';
import type { Effect } from '../signal/v2-signal';
import type { StreamWriter, SymbolToChunkResolver } from '../ssr/ssr-types';
import type { Scheduler } from './scheduler';
import { createScheduler } from './scheduler';
Expand Down Expand Up @@ -44,12 +44,7 @@ export abstract class _SharedContainer implements Container2 {
this.$scheduler$ = createScheduler(this, scheduleDrain, journalFlush);
}

trackSignalValue<T>(
signal: Signal,
subscriber: EffectSubscriptions[EffectSubscriptionsProp.EFFECT],
property: EffectSubscriptions[EffectSubscriptionsProp.PROPERTY],
data: EffectSubscriptions[EffectSubscriptionsProp.DATA]
): T {
trackSignalValue<T>(signal: Signal, subscriber: Effect, property: string, data: any): T {
return trackSignal2(() => signal.value, subscriber, property, this, data);
}

Expand Down
2 changes: 2 additions & 0 deletions packages/qwik/src/core/v2/signal/v2-signal.public.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import {

export { isSignal2 as isSignal } from './v2-signal';

export type { Effect } from './v2-signal';

/** @public */
export interface ReadonlySignal2<T> {
readonly untrackedValue: T;
Expand Down
2 changes: 2 additions & 0 deletions packages/qwik/src/core/v2/signal/v2-signal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ export const isSignal2 = (value: any): value is ISignal2<unknown> => {
* - `Task`: `useTask`, `useVisibleTask`, `useResource`
* - `VNode` and `ISsrNode`: Either a component or `<Signal>`
* - `Signal2`: A derived signal which contains a computation function.
*
* @internal
*/
export type Effect = Task | VNode | ISsrNode | Signal2;

Expand Down

0 comments on commit 7295bec

Please sign in to comment.