Skip to content

Commit 2c9f2ac

Browse files
committed
move assert to utils
1 parent 4ed86ba commit 2c9f2ac

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

src/AutoSubscriptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363

6464
import * as _ from './lodashMini';
6565
import * as Decorator from './Decorator';
66-
import assert from './assert';
6766
import Options from './Options';
67+
import { assert } from './utils';
6868
import { StoreBase } from './StoreBase';
6969

7070
type MetadataIndex = {

src/ComponentBase.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
import * as React from 'react';
1010

1111
import * as _ from './lodashMini';
12-
import assert from './assert';
1312
import Options from './Options';
1413
import Instrumentation from './Instrumentation';
1514
import { SubscriptionCallbackBuildStateFunction, SubscriptionCallbackFunction, StoreSubscription } from './Types';
1615
import { forbidAutoSubscribeWrapper, enableAutoSubscribeWrapper, enableAutoSubscribe } from './AutoSubscriptions';
16+
import { assert } from './utils';
1717
import { AutoSubscription, StoreBase } from './StoreBase';
1818

1919
// Subscriptions without a key need some way to be identified in the SubscriptionLookup.

src/StoreBase.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
*/
1313

1414
import * as _ from './lodashMini';
15-
import assert from './assert';
1615
import Options from './Options';
1716
import Instrumentation from './Instrumentation';
17+
import { assert } from './utils';
1818
import { SubscriptionCallbackFunction } from './Types';
1919

2020
export interface AutoSubscription {
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
/**
2-
* assert
2+
* utils
33
*
44
* Copyright (c) Microsoft Corporation. All rights reserved.
55
* Licensed under the MIT license.
66
*
77
*/
8-
const assert = (cond: any, message?: string | undefined) => {
8+
export const assert = (cond: any, message?: string | undefined) => {
99
if (!cond) {
1010
throw new Error(`[resub] ${ message || 'Assertion Failed' }`);
1111
}
1212
};
13-
14-
export default assert;

0 commit comments

Comments
 (0)