@waiting/shared-types-dev
Advanced tools
Comparing version 1.1.0 to 2.0.0
@@ -6,2 +6,13 @@ # Change Log | ||
# 2.0.0 (2021-04-08) | ||
### Features | ||
* **types-dev:** remove TransTypetoLiteralObjOpts['appendingTypeAssert'] ([573a671](https://github.com/waitingsong/ts-ast/commit/573a67129582567f41cf3f2ebc2c0f055affc9ba)) | ||
# 1.1.0 (2021-04-08) | ||
@@ -8,0 +19,0 @@ |
@@ -5,3 +5,3 @@ /** | ||
* | ||
* @version 1.0.0 | ||
* @version 1.1.0 | ||
* @author waiting | ||
@@ -271,3 +271,3 @@ * @license MIT | ||
function transformCallExpressionToLiteralType(options) { | ||
const { sourceFile, needle, leadingString, trailingString, appendingTypeAssert, } = options; | ||
const { sourceFile, needle, leadingString, trailingString, } = options; | ||
const posKeyMap = new Map(); | ||
@@ -301,3 +301,3 @@ // const insertedNum = importModuleName | ||
+ JSON.stringify(obj, null, 2) | ||
+ (appendingTypeAssert && info.typeReferenceText ? ` as ${typeText}` : '') | ||
+ (info.typeReferenceText ? ` as ${typeText}` : '') | ||
+ ` /* ${trailingString} */`; | ||
@@ -731,3 +731,2 @@ express.replaceWithText(jsonCode); | ||
trailingString: options.trailingString, | ||
appendingTypeAssert: options.appendingTypeAssert, | ||
}; | ||
@@ -807,3 +806,2 @@ const retObj = transformCallExpressionToLiteralType(opts); | ||
trailingString: 'eslint-enable', | ||
appendingTypeAssert: true, | ||
sourceFile: file, | ||
@@ -810,0 +808,0 @@ }; |
@@ -34,3 +34,2 @@ /* eslint-disable max-len */ | ||
trailingString: options.trailingString, | ||
appendingTypeAssert: options.appendingTypeAssert, | ||
}; | ||
@@ -110,3 +109,2 @@ const retObj = transformCallExpressionToLiteralType(opts); | ||
trailingString: 'eslint-enable', | ||
appendingTypeAssert: true, | ||
sourceFile: file, | ||
@@ -113,0 +111,0 @@ }; |
@@ -37,3 +37,3 @@ import { deepFind } from '../util'; | ||
export function transformCallExpressionToLiteralType(options) { | ||
const { sourceFile, needle, leadingString, trailingString, appendingTypeAssert, } = options; | ||
const { sourceFile, needle, leadingString, trailingString, } = options; | ||
const posKeyMap = new Map(); | ||
@@ -67,3 +67,3 @@ // const insertedNum = importModuleName | ||
+ JSON.stringify(obj, null, 2) | ||
+ (appendingTypeAssert && info.typeReferenceText ? ` as ${typeText}` : '') | ||
+ (info.typeReferenceText ? ` as ${typeText}` : '') | ||
+ ` /* ${trailingString} */`; | ||
@@ -70,0 +70,0 @@ express.replaceWithText(jsonCode); |
{ | ||
"name": "@waiting/shared-types-dev", | ||
"author": "waiting", | ||
"version": "1.1.0", | ||
"version": "2.0.0", | ||
"description": "shared typescript types devel", | ||
@@ -93,3 +93,3 @@ "private": false, | ||
}, | ||
"gitHead": "98276463896aa09840e84e596aa1c1fac318e88c" | ||
"gitHead": "e3be5bd75b206c27842d7733ab9d8990589daccd" | ||
} |
@@ -37,4 +37,2 @@ /* eslint-disable max-len */ | ||
tsConfigFilePath: string | ||
/** Appending ` as DbDict<D>` at end of the literal object result */ | ||
appendingTypeAssert: boolean | ||
} | ||
@@ -79,3 +77,2 @@ | ||
trailingString: options.trailingString, | ||
appendingTypeAssert: options.appendingTypeAssert, | ||
} | ||
@@ -176,3 +173,2 @@ const retObj = transformCallExpressionToLiteralType(opts) | ||
trailingString: 'eslint-enable', | ||
appendingTypeAssert: true, | ||
sourceFile: file, | ||
@@ -179,0 +175,0 @@ } |
@@ -26,4 +26,2 @@ /* eslint-disable @typescript-eslint/ban-types */ | ||
trailingString: string | ||
/** Default: true */ | ||
appendingTypeAssert?: boolean | ||
} | ||
@@ -94,3 +92,2 @@ | ||
trailingString, | ||
appendingTypeAssert, | ||
} = options | ||
@@ -129,3 +126,3 @@ | ||
+ JSON.stringify(obj, null, 2) | ||
+ (appendingTypeAssert && info.typeReferenceText ? ` as ${typeText}` : '') | ||
+ (info.typeReferenceText ? ` as ${typeText}` : '') | ||
+ ` /* ${trailingString} */` | ||
@@ -132,0 +129,0 @@ express.replaceWithText(jsonCode) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
132590
2901