Skip to content

Commit 01c3426

Browse files
committed
wip
1 parent 2674966 commit 01c3426

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

packages/signals/signals-runtime/src/shared/shared-types.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,13 @@ export interface ISignalsRuntime<Signal extends BaseSignal> {
1414
predicate?: (signal: SignalOfType<Signal, SignalType>) => boolean
1515
) => SignalOfType<Signal, SignalType> | undefined
1616
}
17+
18+
export type JSONPrimitive = string | number | boolean | null
19+
export type JSONValue = JSONPrimitive | JSONObject | JSONArray
20+
export type JSONObject = { [member: string]: JSONValue }
21+
export type JSONArray = JSONValue[]
22+
23+
export interface SegmentEvent {
24+
type: string // e.g 'track'
25+
[key: string]: any
26+
}

packages/signals/signals-runtime/src/web/web-signals-types.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
export type JSONPrimitive = string | number | boolean | null
2-
export type JSONValue = JSONPrimitive | JSONObject | JSONArray
3-
export type JSONObject = { [member: string]: JSONValue }
4-
export type JSONArray = JSONValue[]
1+
import { JSONValue } from '../shared/shared-types'
52

63
export type SignalTypes = Signal['type']
74

@@ -103,8 +100,3 @@ export type Signal =
103100
| InstrumentationSignal
104101
| NetworkSignal
105102
| UserDefinedSignal
106-
107-
export interface SegmentEvent {
108-
type: string // e.g 'track'
109-
[key: string]: any
110-
}

0 commit comments

Comments
 (0)