ts-auto-guard
Advanced tools
Comparing version 4.1.4 to 4.1.5
@@ -106,2 +106,6 @@ "use strict"; | ||
} | ||
function propertyName(signature) { | ||
var _a, _b; | ||
return ((_b = (_a = signature.getNameNode().getSymbol()) === null || _a === void 0 ? void 0 : _a.compilerSymbol.escapedName) !== null && _b !== void 0 ? _b : signature.getName()); | ||
} | ||
function typeToDependency(type, addDependency) { | ||
@@ -347,9 +351,6 @@ var exportable = findExportableNode(type); | ||
// getProperties does not include methods like `foo(): void` | ||
var properties = __spreadArray(__spreadArray([], __read(declaration.getProperties()), false), __read(declaration.getMethods()), false).map(function (p) { | ||
var _a, _b; | ||
return ({ | ||
name: (_b = (_a = p.getSymbol()) === null || _a === void 0 ? void 0 : _a.getEscapedName()) !== null && _b !== void 0 ? _b : p.getName(), | ||
type: p.getType(), | ||
}); | ||
}); | ||
var properties = __spreadArray(__spreadArray([], __read(declaration.getProperties()), false), __read(declaration.getMethods()), false).map(function (p) { return ({ | ||
name: propertyName(p), | ||
type: p.getType(), | ||
}); }); | ||
conditions.push.apply(conditions, __spreadArray([], __read(propertiesConditions(varName, properties, addDependency, project, path, arrayDepth, records, outFile, options)), false)); | ||
@@ -356,0 +357,0 @@ var indexSignatures = declaration |
{ | ||
"name": "ts-auto-guard", | ||
"version": "4.1.4", | ||
"version": "4.1.5", | ||
"description": "Generate type guard functions from TypeScript interfaces", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/rhys-vdw/ts-auto-guard", |
@@ -25,2 +25,7 @@ # ts-auto-guard | ||
## TypeScript configuration | ||
It makes sense to use this library in `strict` mode. Make sure to turn on the [strict mode family](https://www.typescriptlang.org/tsconfig#strict) options by defining `"strict": true` in `tsconfig.json` under `compilerOptions`. | ||
If you have any problems check that strict mode family options, such as `strictNullChecks`, are not explicitly set to false. Check [these](https://github.com/rhys-vdw/ts-auto-guard/issues/120) [issues](https://github.com/rhys-vdw/ts-auto-guard/issues/152) for more info. | ||
## Usage | ||
@@ -27,0 +32,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
151587
74
3161
179