This repository was archived by the owner on Sep 3, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +11
-11
lines changed Expand file tree Collapse file tree 6 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -158,8 +158,8 @@ Analytics.prototype.addDestinationMiddleware = function(
158
158
*/
159
159
160
160
Analytics . prototype . init = Analytics . prototype . initialize = function (
161
- settings : IntegrationsSettings ,
162
- options : InitOptions
161
+ settings ? : IntegrationsSettings ,
162
+ options ? : InitOptions
163
163
) : SegmentAnalytics {
164
164
settings = settings || { } ;
165
165
options = options || { } ;
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ function Cookie(options?: CookieOptions) {
27
27
* Get or set the cookie options.
28
28
*/
29
29
30
- Cookie . prototype . options = function ( options : CookieOptions ) {
30
+ Cookie . prototype . options = function ( options ? : CookieOptions ) {
31
31
if ( arguments . length === 0 ) return this . _options ;
32
32
33
33
options = options || { } ;
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ Entity.prototype.storage = function() {
72
72
* Get or set storage `options`.
73
73
*/
74
74
75
- Entity . prototype . options = function ( options : InitOptions ) {
75
+ Entity . prototype . options = function ( options ? : InitOptions ) {
76
76
if ( arguments . length === 0 ) return this . _options ;
77
77
this . _options = defaults ( options || { } , this . defaults || { } ) ;
78
78
} ;
@@ -81,7 +81,7 @@ Entity.prototype.options = function(options: InitOptions) {
81
81
* Get or set the entity's `id`.
82
82
*/
83
83
84
- Entity . prototype . id = function ( id : string ) : string | undefined {
84
+ Entity . prototype . id = function ( id ? : string ) : string | undefined {
85
85
switch ( arguments . length ) {
86
86
case 0 :
87
87
return this . _getId ( ) ;
@@ -177,7 +177,7 @@ Entity.prototype._setIdInLocalStorage = function(id: string) {
177
177
*/
178
178
179
179
Entity . prototype . properties = Entity . prototype . traits = function (
180
- traits : object
180
+ traits ? : object
181
181
) : object | undefined {
182
182
switch ( arguments . length ) {
183
183
case 0 :
@@ -219,7 +219,7 @@ Entity.prototype._setTraits = function(traits: object) {
219
219
* extend the existing `traits` instead of overwriting.
220
220
*/
221
221
222
- Entity . prototype . identify = function ( id : string , traits : object ) {
222
+ Entity . prototype . identify = function ( id ? : string , traits ? : object ) {
223
223
traits = traits || { } ;
224
224
var current = this . id ( ) ;
225
225
if ( current === null || current === id )
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ function Metrics(options?: MetricsOptions) {
14
14
* Set the metrics options.
15
15
*/
16
16
17
- Metrics . prototype . options = function ( options : MetricsOptions ) {
17
+ Metrics . prototype . options = function ( options ? : MetricsOptions ) {
18
18
options = options || { } ;
19
19
20
20
this . host = options . host || 'api.segment.io/v1' ;
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ function Store(options?: { enabled: boolean }) {
22
22
* Set the `options` for the store.
23
23
*/
24
24
25
- Store . prototype . options = function ( options : { enabled ?: boolean } ) {
25
+ Store . prototype . options = function ( options ? : { enabled ?: boolean } ) {
26
26
if ( arguments . length === 0 ) return this . _options ;
27
27
28
28
options = options || { } ;
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ inherit(User, Entity);
86
86
* assert.notEqual(anonymousId, user.anonymousId());
87
87
*/
88
88
89
- User . prototype . id = function ( id : string ) : string | undefined {
89
+ User . prototype . id = function ( id ? : string ) : string | undefined {
90
90
var prev = this . _getId ( ) ;
91
91
var ret = Entity . prototype . id . apply ( this , arguments ) ;
92
92
if ( prev == null ) return ret ;
@@ -106,7 +106,7 @@ User.prototype.id = function(id: string): string | undefined {
106
106
* @return {String|User }
107
107
*/
108
108
109
- User . prototype . anonymousId = function ( anonymousId : string ) : string | User {
109
+ User . prototype . anonymousId = function ( anonymousId ? : string ) : string | User {
110
110
var store = this . storage ( ) ;
111
111
112
112
// set / remove
You can’t perform that action at this time.
0 commit comments