New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@rushstack/typings-generator

Package Overview
Dependencies
Maintainers
3
Versions
327
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rushstack/typings-generator - npm Package Compare versions

Comparing version

to
0.2.13

12

CHANGELOG.json

@@ -5,2 +5,14 @@ {

{
"version": "0.2.13",
"tag": "@rushstack/typings-generator_v0.2.13",
"date": "Thu, 01 Oct 2020 18:51:21 GMT",
"comments": {
"patch": [
{
"comment": "Handle export names with special chars in exportAsDefault interface keys."
}
]
}
},
{
"version": "0.2.12",

@@ -7,0 +19,0 @@ "tag": "@rushstack/typings-generator_v0.2.12",

9

CHANGELOG.md
# Change Log - @rushstack/typings-generator
This log was last generated on Wed, 30 Sep 2020 18:39:17 GMT and should not be manually modified.
This log was last generated on Thu, 01 Oct 2020 18:51:21 GMT and should not be manually modified.
## 0.2.13
Thu, 01 Oct 2020 18:51:21 GMT
### Patches
- Handle export names with special chars in exportAsDefault interface keys.
## 0.2.12

@@ -6,0 +13,0 @@ Wed, 30 Sep 2020 18:39:17 GMT

2

dist/tsdoc-metadata.json

@@ -8,5 +8,5 @@ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.

"packageName": "@microsoft/api-extractor",
"packageVersion": "7.10.0"
"packageVersion": "7.10.1"
}
]
}

@@ -7,3 +7,11 @@ import { Terminal } from '@rushstack/node-core-library';

export declare interface IStringValuesTypingsGeneratorOptions extends ITypingsGeneratorOptions<IStringValueTypings> {
/**
* Setting this option wraps the typings export in a default property.
*/
exportAsDefault?: boolean;
/**
* When `exportAsDefault` is true, this optional setting determines the interface name
* for the default wrapped export. Ignored when `exportAsDefault` is false.
*/
exportAsDefaultInterfaceName?: string;
}

@@ -10,0 +18,0 @@

@@ -19,3 +19,11 @@ import { ITypingsGeneratorOptions, TypingsGenerator } from './TypingsGenerator';

export interface IStringValuesTypingsGeneratorOptions extends ITypingsGeneratorOptions<IStringValueTypings> {
/**
* Setting this option wraps the typings export in a default property.
*/
exportAsDefault?: boolean;
/**
* When `exportAsDefault` is true, this optional setting determines the interface name
* for the default wrapped export. Ignored when `exportAsDefault` is false.
*/
exportAsDefaultInterfaceName?: string;
}

@@ -22,0 +30,0 @@ /**

@@ -20,5 +20,8 @@ "use strict";

const outputLines = [];
const interfaceName = options.exportAsDefaultInterfaceName
? options.exportAsDefaultInterfaceName
: EXPORT_AS_DEFAULT_INTERFACE_NAME;
let indent = '';
if (options.exportAsDefault) {
outputLines.push(`export interface ${EXPORT_AS_DEFAULT_INTERFACE_NAME} {`);
outputLines.push(`export interface ${interfaceName} {`);
indent = ' ';

@@ -32,3 +35,3 @@ }

if (options.exportAsDefault) {
outputLines.push(`${indent}${exportName}: string;`, '');
outputLines.push(`${indent}'${exportName}': string;`, '');
}

@@ -40,3 +43,3 @@ else {

if (options.exportAsDefault) {
outputLines.push('}', '', `declare const strings: ${EXPORT_AS_DEFAULT_INTERFACE_NAME};`, 'export default strings;');
outputLines.push('}', '', `declare const strings: ${interfaceName};`, '', 'export default strings;');
}

@@ -43,0 +46,0 @@ return outputLines.join(os_1.EOL);

{
"name": "@rushstack/typings-generator",
"version": "0.2.12",
"version": "0.2.13",
"description": "This library provides functionality for automatically generating typings for non-TS files.",

@@ -29,3 +29,3 @@ "keywords": [

"@rushstack/eslint-config": "2.1.3",
"@rushstack/heft": "0.14.1",
"@rushstack/heft": "0.14.0",
"@rushstack/heft-node-rig": "0.1.1",

@@ -32,0 +32,0 @@ "@types/glob": "7.1.1"

@@ -119,2 +119,9 @@ # @rushstack/typings-generator

### `exportAsDefaultInterfaceName = true | false`
When `exportAsDefault` is true, this optional setting determines the interface name
for the default wrapped export. For example, in the Sass Typings plugin, the interface name
is set to `IExportStyles`. If not specified, the interface name will be `IExport`.
(This setting is ignored when `exportAsDefault` is false).
## Links

@@ -121,0 +128,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet