UNPKG

1.89 kBPlain TextView Raw
1export * from './lib/array-utils';
2export { default as assert, deprecate } from './lib/assert';
3export { dict, isDict, isObject, StackImpl as Stack } from './lib/collections';
4export { beginTestSteps, endTestSteps, logStep, verifySteps } from './lib/debug-steps';
5export { default as debugToString } from './lib/debug-to-string';
6export * from './lib/dom';
7export * from './lib/dom-utils';
8export * from './lib/immediate';
9export { default as intern } from './lib/intern';
10export {
11 isSerializationFirstNode,
12 SERIALIZATION_FIRST_NODE_STRING,
13} from './lib/is-serialization-first-node';
14export { assign, entries, values } from './lib/object-utils';
15export * from './lib/platform-utils';
16export * from './lib/present';
17export {
18 castToBrowser,
19 castToSimple,
20 checkBrowserNode as checkNode,
21 isElement,
22 isSimpleElement,
23} from './lib/simple-cast';
24export * from './lib/string';
25export * from './lib/template';
26export { default as buildUntouchableThis } from './lib/untouchable-this';
27
28export type FIXME<T, S extends string> = (T & S) | T;
29
30/**
31 * This constant exists to make it easier to differentiate normal logs from
32 * errant console.logs. LOCAL_LOGGER should only be used inside a
33 * LOCAL_SHOULD_LOG check.
34 *
35 * It does not alleviate the need to check LOCAL_SHOULD_LOG, which is used
36 * for stripping.
37 */
38export const LOCAL_LOGGER = console;
39
40/**
41 * This constant exists to make it easier to differentiate normal logs from
42 * errant console.logs. LOGGER can be used outside of LOCAL_SHOULD_LOG checks,
43 * and is meant to be used in the rare situation where a console.* call is
44 * actually appropriate.
45 */
46export const LOGGER = console;
47
48export function assertNever(value: never, desc = 'unexpected unreachable branch'): never {
49 LOGGER.log('unreachable', value);
50 LOGGER.log(`${desc} :: ${JSON.stringify(value)} (${value})`);
51
52 throw new Error(`code reached unreachable`);
53}