File tree 3 files changed +10
-13
lines changed
3 files changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -23,19 +23,12 @@ import {
23
23
marshalledRefKey
24
24
} from "./marshalled-data-keys" ;
25
25
26
- // tslint:disable:no-any
27
- // tslint:disable:no-shadowed-variable
28
- // tslint:disable:no-construct
29
-
30
26
/**
31
27
* A Regular expression that matches the description of a Symbol
32
28
* @type {RegExp }
33
29
*/
34
30
const SYMBOL_REGEX : RegExp = / S y m b o l \( ( [ ^ ) ] * ) \) / ;
35
31
36
- // Until Typescript ships typings for BigInt, declare it here
37
- declare const BigInt : Function ;
38
-
39
32
/**
40
33
* Marshalls the given value
41
34
* @param {T } value
@@ -314,10 +307,11 @@ function demarshallValue(
314
307
case "ref" : {
315
308
const { value } = < IMarshalledRefData > data ;
316
309
const refMapHit = refMap . get ( value ) ;
317
- if ( refMapHit == null )
310
+ if ( refMapHit == null ) {
318
311
throw new ReferenceError (
319
312
`Internal Error: Could not resolve a reference!!`
320
313
) ;
314
+ }
321
315
return refMapHit ;
322
316
}
323
317
@@ -452,7 +446,7 @@ export function isMarshalledData(data: any): data is MarshalledData {
452
446
* @returns {string }
453
447
*/
454
448
function generateRef ( currentCount : number ) : string {
455
- return `${ ++ currentCount } ` ;
449
+ return `${ currentCount + 1 } ` ;
456
450
}
457
451
458
452
/**
Original file line number Diff line number Diff line change 1
1
import test from "ava" ;
2
2
import { demarshall , marshall } from "../src/marshaller/marshaller" ;
3
3
4
- // tslint:disable:no-any
5
- // tslint:disable:no-construct
6
-
7
4
test ( "#1" , t => {
8
5
const original = undefined ;
9
6
const marshalled = marshall ( original ) ;
Original file line number Diff line number Diff line change 1
1
{
2
- "extends" : " ./node_modules/@wessberg/ts-config/tslint.json"
2
+ "extends" : " ./node_modules/@wessberg/ts-config/tslint.json" ,
3
+ "rules" : {
4
+ "use-primitive-type" : false ,
5
+ "no-construct" : false ,
6
+ "no-any" : false ,
7
+ "no-shadowed-variable" : false
8
+ }
3
9
}
You can’t perform that action at this time.
0 commit comments