Skip to content

Commit 38d25fa

Browse files
fix(enums): Workaround angular compiler export issue angular/angular#23759
1 parent 5ab0ebb commit 38d25fa

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

src/common/trace.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,16 @@ const consoletable = isFunction(console.table) ? console.table.bind(console) : c
8787
*
8888
* `trace.enable(1)`
8989
*/
90-
export enum Category {
90+
enum Category {
9191
RESOLVE,
9292
TRANSITION,
9393
HOOK,
9494
UIVIEW,
9595
VIEWCONFIG,
9696
}
9797

98+
export { Category };
99+
98100
/** @hidden */
99101
const _tid = parse('$id');
100102

src/params/param.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@ const isShorthand = (cfg: ParamDeclaration) =>
1919
['value', 'type', 'squash', 'array', 'dynamic'].filter(hasOwn.bind(cfg || {})).length === 0;
2020

2121
/** @internalapi */
22-
export enum DefType {
22+
enum DefType {
2323
PATH,
2424
SEARCH,
2525
CONFIG,
2626
}
27+
export { DefType };
2728

2829
/** @hidden */
2930
function unwrapShorthand(cfg: ParamDeclaration): ParamDeclaration {
@@ -49,7 +50,11 @@ function getType(cfg: ParamDeclaration, urlType: ParamType, location: DefType, i
4950
const type =
5051
location === DefType.CONFIG
5152
? 'any'
52-
: location === DefType.PATH ? 'path' : location === DefType.SEARCH ? 'query' : 'string';
53+
: location === DefType.PATH
54+
? 'path'
55+
: location === DefType.SEARCH
56+
? 'query'
57+
: 'string';
5358
return paramTypes.type(type);
5459
}
5560
return cfg.type instanceof ParamType ? cfg.type : paramTypes.type(cfg.type as string);

src/transition/interface.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -836,14 +836,16 @@ export interface PathType {
836836
*/
837837
export type HookMatchCriterion = string | IStateMatch | boolean;
838838

839-
export enum TransitionHookPhase {
839+
enum TransitionHookPhase {
840840
CREATE,
841841
BEFORE,
842842
RUN,
843843
SUCCESS,
844844
ERROR,
845845
}
846-
export enum TransitionHookScope {
846+
enum TransitionHookScope {
847847
TRANSITION,
848848
STATE,
849849
}
850+
851+
export { TransitionHookPhase, TransitionHookScope };

src/transition/rejectFactory.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { extend, silentRejection } from '../common/common';
77
import { stringify } from '../common/strings';
88
import { is } from '../common/hof';
99

10-
export enum RejectType {
10+
enum RejectType {
1111
/**
1212
* A new transition superseded this one.
1313
*
@@ -50,6 +50,8 @@ export enum RejectType {
5050
ERROR = 6,
5151
}
5252

53+
export { RejectType };
54+
5355
/** @hidden */
5456
let id = 0;
5557

0 commit comments

Comments
 (0)