Skip to content

Commit

Permalink
chore: ignore private properties to d.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
crashmax-dev committed Dec 5, 2023
1 parent f0041c7 commit 7ef0e6f
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/cli/mock/locales/strings1.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<resources>
<string name="key1">value1</string>
<string name="key2">value2</string>
</resources>
</resources>
4 changes: 3 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@
},
"dependencies": {
"@inquirer/prompts": "3.3.0",
"@types/yargs": "17.0.32",
"xml-locales": "workspace:0.0.4",
"yargs": "17.7.2"
},
"devDependencies": {
"@types/yargs": "17.0.32"
}
}
3 changes: 2 additions & 1 deletion packages/cli/src/utils/files.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ describe('writeFile', () => {
`<resources>
<string name="key1">value1</string>
<string name="key2">value2</string>
</resources>`
</resources>
`
);
});
});
3 changes: 3 additions & 0 deletions packages/xml-locales/src/utils/xml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ const defaultXmlOptions: XmlConstructor = {
};

export class XmlParser {
/** @internal */
private parser: XMLParser;
/** @internal */
private builder: XMLBuilder;
/** @internal */
private formatter: (xmlString: string) => string;

constructor(xmlOptions?: XmlConstructor) {
Expand Down
6 changes: 5 additions & 1 deletion packages/xml-locales/src/xml-locales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ import type {
import type { XmlConstructor } from './utils/xml.js';

export class XmlLocales {
/** @internal */
private readonly xmlParser: XmlParser;

/** @internal */
private xmlOptions?: XmlConstructor;
/** @internal */
private xmlData: XmlJsonData;

constructor(
Expand All @@ -29,6 +31,7 @@ export class XmlLocales {
this.parseXml(xmlData);
}

/** @internal */
private parseXml(xmlData?: XmlDataTypes): void {
if (xmlData instanceof XmlJsonData) {
this.xmlData = xmlData;
Expand All @@ -52,6 +55,7 @@ export class XmlLocales {
}
}

/** @internal */
private newInstance(): XmlLocales {
return new XmlLocales(this.xmlData, this.xmlOptions);
}
Expand Down
11 changes: 6 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7ef0e6f

Please sign in to comment.