Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"test": "yarn test-unit",
"test-types": "yarn run-test-types && yarn run-types-gen",
"run-test-types": "node test/typescript/index.js",
"run-types-gen": "tsc --esModuleInterop true --noEmit true --strictNullChecks true --noImplicitAny true --strict true test/typescript/*.ts",
"run-types-gen": "tsc -p test/typescript/tsconfig.json",
"test-unit": "vitest",
"test-coverage": "vitest run --coverage",
"fix-staged": "lint-staged --config .lintstagedrc.fix.json --concurrent 1",
Expand Down
4 changes: 4 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ export type AppSettingsAPIResponse = APIResponse & {
app?: {
id?: string | number;
allow_multi_user_devices?: boolean;
feed_audit_logs_enabled?: boolean;
moderation_onboarding_complete?: boolean | null;
// TODO
// eslint-disable-next-line @typescript-eslint/no-explicit-any
call_types: any;
Expand Down Expand Up @@ -2533,6 +2535,7 @@ export type BlockList = {
team?: string;
type?: string;
validate?: boolean;
is_confusable_folding_enabled?: boolean;
is_leet_check_enabled?: boolean;
is_plural_check_enabled?: boolean;
};
Expand Down Expand Up @@ -2692,6 +2695,7 @@ export type ConnectionOpen = {
connection_id: string;
cid?: string;
created_at?: string;
received_at?: string;
me?: OwnUserResponse;
type?: string;
};
Expand Down
19 changes: 14 additions & 5 deletions test/typescript/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
{
// Type-checks the generated API response fixtures (data.ts) and the
// hand-written unit-test.ts against the built declarations in dist/types.
//
// Extends the root config so module resolution, lib and strictness (notably
// moduleResolution "bundler" and skipLibCheck) match what `yarn build`
// emits. Invoked via `tsc -p` (see the run-types-gen script): passing the
// files on the command line instead trips TypeScript 6's error TS5112
// ("tsconfig.json is present but will not be loaded if files are specified
// on commandline").
"extends": "../../tsconfig.json",
"compilerOptions": {
"esModuleInterop": true,
"noImplicitAny": true,
"strict": true,
"strictNullChecks": true
}
"noEmit": true,
"rootDir": "."
},
"include": ["./*.ts"]
}
Loading