Skip to content

Commit 14b6369

Browse files
committed
chore: apply naming conventions
1 parent 0c51d40 commit 14b6369

File tree

491 files changed

+5730
-4138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

491 files changed

+5730
-4138
lines changed

packages/alphatab/scripts/CloneEmitter.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ function toImportPath(fileName: string) {
1717
}
1818

1919
function isCloneMember(propertyDeclaration: ts.PropertyDeclaration) {
20+
if (ts.isPrivateIdentifier(propertyDeclaration.name)){
21+
return false;
22+
}
23+
2024
if (propertyDeclaration.modifiers) {
2125
if (
2226
propertyDeclaration.modifiers.find(
@@ -347,16 +351,20 @@ export default createEmitter('cloneable', (program, input) => {
347351
);
348352
}
349353

350-
statements.push(
351-
ts.factory.createClassDeclaration(
354+
const clz = ts.addSyntheticLeadingComment(ts.factory.createClassDeclaration(
352355
[ts.factory.createModifier(ts.SyntaxKind.ExportKeyword)],
353356
`${input.name!.text}Cloner`,
354357
undefined,
355358
undefined,
356359
[createCloneMethod(program, input, importer)]
357-
)
360+
),
361+
ts.SyntaxKind.MultiLineCommentTrivia,
362+
'*\n * @internal\n ',
363+
true
358364
);
359365

366+
statements.push(clz);
367+
360368
const sourceFile = ts.factory.createSourceFile(
361369
[
362370
ts.factory.createImportDeclaration(

packages/alphatab/scripts/SerializerEmitter.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ export default createEmitter('json', (program, input) => {
4343
);
4444
}
4545

46-
statements.push(
47-
ts.factory.createClassDeclaration(
46+
const clz = ts.addSyntheticLeadingComment(ts.factory.createClassDeclaration(
4847
[ts.factory.createModifier(ts.SyntaxKind.ExportKeyword)],
4948
`${input.name!.text}Serializer`,
5049
undefined,
@@ -54,9 +53,14 @@ export default createEmitter('json', (program, input) => {
5453
createToJsonMethod(input, serializable, importer),
5554
createSetPropertyMethod(input, serializable, importer)
5655
]
57-
)
56+
),
57+
ts.SyntaxKind.MultiLineCommentTrivia,
58+
'*\n * @internal\n ',
59+
true
5860
);
5961

62+
statements.push(clz);
63+
6064
const sourceFile = ts.factory.createSourceFile(
6165
[
6266
ts.factory.createImportDeclaration(

packages/alphatab/scripts/generate-typescript.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ fs.writeSync(
3636
`\
3737
${GENERATED_FILE_HEADER}
3838
39-
39+
/**
40+
* @internal
41+
*/
4042
export class VersionInfo {
4143
public static readonly version: string = '${version}';
4244
public static readonly date: string = '${new Date().toISOString()}';

0 commit comments

Comments
 (0)