Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Commit

Permalink
Small Documentation Tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
Stuyk committed Mar 26, 2023
1 parent 552012c commit 30a2009
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
13 changes: 9 additions & 4 deletions scripts/documentation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ function getApiPath(somePath) {
apiPath = apiPath.replace(/\//gm, '.').replace('shared.', 'AthenaShared.');
}

if (apiPath.includes('..')) {
apiPath = apiPath.replace(/\.\./gm, '.');
}

return apiPath;
}

Expand All @@ -51,12 +55,13 @@ for (let file of files) {
continue;
}

if (file.includes('internal')) {
continue;
}

const apiPath = getApiPath(file);
const rows = fs.readFileSync(file).toString().split('\n');
if (rows.length <= 3) {
console.log(`Deleting Dead File: ${file}`);
fs.rmSync(file);
continue;
}

// Remove first row, since the title sucks
rows.shift();
Expand Down
9 changes: 9 additions & 0 deletions src/core/shared/utility/knownKeys.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
/**
* @ignore
*/
export type KnownKeys<T> = {
[K in keyof T as string extends K ? never : number extends K ? never : K]: T[K];
};

/**
* @ignore
*/
export type OmitFromKnownKeys<T, K extends keyof T> = KnownKeys<T> extends infer U
? keyof U extends keyof T
? Pick<T, Exclude<keyof U, K>> & Pick<T, Exclude<keyof T, keyof KnownKeys<T>>>
: never
: never;

/**
* @ignore
*/
export type RemoveIndex<T> = {
[P in keyof T as string extends P ? never : number extends P ? never : P]: T[P];
};
3 changes: 3 additions & 0 deletions src/core/shared/utility/requiredFields.ts
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
/**
* @ignore
*/
export type RequireFields<T, K extends keyof T> = T & Required<Pick<T, K>>;
5 changes: 3 additions & 2 deletions src/core/typedoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"out": "../../docs",
"skipErrorChecking": true,
"tsconfig": "./custom.json",
"plugin": ["typedoc-plugin-external-resolver", "typedoc-plugin-missing-exports", "typedoc-plugin-markdown"],
"plugin": ["typedoc-plugin-missing-exports", "typedoc-plugin-markdown"],
"theme": "markdown",
"basePath": "./",
"entryPointStrategy": "expand",
Expand All @@ -15,5 +15,6 @@
"hideInPageTOC": true,
"hideMembersSymbol": false,
"objectLiteralTypeDeclarationStyle": "table",
"filenameSeparator": "_"
"filenameSeparator": "_",
"internalModule": "Internal"
}

0 comments on commit 30a2009

Please sign in to comment.