Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion modules/signals/entities/src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
SelectEntityId,
} from './models';

declare const ngDevMode: unknown;
const defaultSelectId: SelectEntityId<{ id: EntityId }> = (entity) => entity.id;

export function getEntityIdSelector(config?: {
Expand Down
8 changes: 6 additions & 2 deletions modules/signals/events/src/events-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@ import {
import { EventInstance } from './event-instance';
import { EventCreator } from './event-creator';

export const EVENTS = Symbol();
export const SOURCE_TYPE = Symbol();
export const EVENTS = Symbol(
typeof ngDevMode !== 'undefined' && ngDevMode ? 'EVENTS' : ''
);
export const SOURCE_TYPE = Symbol(
typeof ngDevMode !== 'undefined' && ngDevMode ? 'SOURCE_TYPE' : ''
);

abstract class BaseEvents {
/**
Expand Down
2 changes: 0 additions & 2 deletions modules/signals/rxjs-interop/src/rx-method.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import {
} from '@angular/core';
import { isObservable, noop, Observable, Subject } from 'rxjs';

declare const ngDevMode: unknown;

type RxMethodRef = {
destroy: () => void;
};
Expand Down
4 changes: 3 additions & 1 deletion modules/signals/src/deep-signal.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { computed, isSignal, Signal, untracked } from '@angular/core';
import { IsKnownRecord } from './ts-helpers';

const DEEP_SIGNAL = Symbol('DEEP_SIGNAL');
const DEEP_SIGNAL = Symbol(
typeof ngDevMode !== 'undefined' && ngDevMode ? 'DEEP_SIGNAL' : ''
);

export type DeepSignal<T> = Signal<T> &
(IsKnownRecord<T> extends true
Expand Down
2 changes: 0 additions & 2 deletions modules/signals/src/signal-method.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import {
untracked,
} from '@angular/core';

declare const ngDevMode: unknown;

export type SignalMethod<Input> = ((
input: Input | Signal<Input>,
config?: { injector?: Injector }
Expand Down
6 changes: 3 additions & 3 deletions modules/signals/src/state-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import {
WritableSignal,
} from '@angular/core';

declare const ngDevMode: unknown;

const STATE_WATCHERS = new WeakMap<object, Array<StateWatcher<any>>>();

export const STATE_SOURCE = Symbol('STATE_SOURCE');
export const STATE_SOURCE = Symbol(
typeof ngDevMode !== 'undefined' && ngDevMode ? 'STATE_SOURCE' : ''
);

export type WritableStateSource<State extends object> = {
[STATE_SOURCE]: { [K in keyof State]: WritableSignal<State[K]> };
Expand Down