fix(types): add TypeScript declarations for JS modules
Add .d.ts files for all JS modules imported by TypeScript source to resolve TS7016 errors. Files are force-added because src/**/*.d.ts is gitignored. - preferences, preferences-models, gitignore, agentic-docs-scaffold - doc-checker, code-intelligence, native-git-bridge, paths, repo-identity - types, trace-collector, doctor, url-utils, config
This commit is contained in:
parent
ccdd3027ab
commit
33383ed53a
14 changed files with 133 additions and 0 deletions
8
src/resources/extensions/remote-questions/config.d.ts
vendored
Normal file
8
src/resources/extensions/remote-questions/config.d.ts
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
export interface RemoteConfig {
|
||||
endpoint: string;
|
||||
apiKey?: string;
|
||||
timeout?: number;
|
||||
}
|
||||
|
||||
export function resolveRemoteConfig(): RemoteConfig;
|
||||
export function loadRemoteConfig(path?: string): RemoteConfig;
|
||||
3
src/resources/extensions/search-the-web/url-utils.d.ts
vendored
Normal file
3
src/resources/extensions/search-the-web/url-utils.d.ts
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export function normalizeUrl(url: string): string;
|
||||
export function isValidUrl(url: string): boolean;
|
||||
export function extractDomain(url: string): string;
|
||||
7
src/resources/extensions/sf/agentic-docs-scaffold.d.ts
vendored
Normal file
7
src/resources/extensions/sf/agentic-docs-scaffold.d.ts
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
export interface ScaffoldResult {
|
||||
success: boolean;
|
||||
files?: string[];
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export function scaffoldDocs(options?: { basePath?: string }): ScaffoldResult;
|
||||
8
src/resources/extensions/sf/code-intelligence.d.ts
vendored
Normal file
8
src/resources/extensions/sf/code-intelligence.d.ts
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
export interface CodeIntelligenceResult {
|
||||
symbols?: string[];
|
||||
dependencies?: string[];
|
||||
complexity?: number;
|
||||
}
|
||||
|
||||
export function analyzeCode(path: string): CodeIntelligenceResult;
|
||||
export function getSymbolDefinitions(query: string): unknown[];
|
||||
7
src/resources/extensions/sf/doc-checker.d.ts
vendored
Normal file
7
src/resources/extensions/sf/doc-checker.d.ts
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
export interface DocCheckResult {
|
||||
summary: string;
|
||||
issues?: string[];
|
||||
score?: number;
|
||||
}
|
||||
|
||||
export function checkDocsScaffold(path: string): DocCheckResult;
|
||||
8
src/resources/extensions/sf/doctor.d.ts
vendored
Normal file
8
src/resources/extensions/sf/doctor.d.ts
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
export interface DoctorResult {
|
||||
healthy: boolean;
|
||||
issues: string[];
|
||||
recommendations: string[];
|
||||
}
|
||||
|
||||
export function runDoctor(): DoctorResult;
|
||||
export function checkSystemHealth(): Promise<DoctorResult>;
|
||||
2
src/resources/extensions/sf/gitignore.d.ts
vendored
Normal file
2
src/resources/extensions/sf/gitignore.d.ts
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
export function isPathIgnored(path: string, basePath?: string): boolean;
|
||||
export function loadGitignore(basePath?: string): void;
|
||||
9
src/resources/extensions/sf/native-git-bridge.d.ts
vendored
Normal file
9
src/resources/extensions/sf/native-git-bridge.d.ts
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
export interface GitStatus {
|
||||
branch: string;
|
||||
clean: boolean;
|
||||
modified: string[];
|
||||
untracked: string[];
|
||||
}
|
||||
|
||||
export function getGitStatus(path?: string): GitStatus;
|
||||
export function execGit(args: string[], cwd?: string): { stdout: string; stderr: string; code: number };
|
||||
2
src/resources/extensions/sf/paths.d.ts
vendored
Normal file
2
src/resources/extensions/sf/paths.d.ts
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
export function resolvePath(path: string): string;
|
||||
export function getProjectRoot(): string;
|
||||
8
src/resources/extensions/sf/preferences-models.d.ts
vendored
Normal file
8
src/resources/extensions/sf/preferences-models.d.ts
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
export interface ModelConfig {
|
||||
provider: string;
|
||||
model: string;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export function isProviderModelAllowed(provider: string, model: string): boolean;
|
||||
export function getDefaultModel(): ModelConfig;
|
||||
13
src/resources/extensions/sf/preferences.d.ts
vendored
Normal file
13
src/resources/extensions/sf/preferences.d.ts
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
export interface Preferences {
|
||||
preferences?: {
|
||||
experimental?: {
|
||||
rtk?: boolean;
|
||||
[key: string]: unknown;
|
||||
};
|
||||
[key: string]: unknown;
|
||||
};
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export function loadPreferences(): Preferences;
|
||||
export function getPreferences(): Preferences;
|
||||
9
src/resources/extensions/sf/repo-identity.d.ts
vendored
Normal file
9
src/resources/extensions/sf/repo-identity.d.ts
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
export interface RepoIdentity {
|
||||
name: string;
|
||||
url?: string;
|
||||
branch: string;
|
||||
commit: string;
|
||||
}
|
||||
|
||||
export function getRepoIdentity(path?: string): RepoIdentity;
|
||||
export function getRepoName(): string;
|
||||
19
src/resources/extensions/sf/trace-collector.d.ts
vendored
Normal file
19
src/resources/extensions/sf/trace-collector.d.ts
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
export interface Span {
|
||||
id: string;
|
||||
name: string;
|
||||
startTime: number;
|
||||
endTime?: number;
|
||||
attributes: Record<string, unknown>;
|
||||
children: Span[];
|
||||
}
|
||||
|
||||
export interface Trace {
|
||||
id: string;
|
||||
rootSpan: Span;
|
||||
startTime: number;
|
||||
endTime?: number;
|
||||
attributes: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export function initTraceCollector(): { getActiveTrace(): Trace | null } | null;
|
||||
export function getTraceCollector(): { getActiveTrace(): Trace | null } | null;
|
||||
30
src/resources/extensions/sf/types.d.ts
vendored
Normal file
30
src/resources/extensions/sf/types.d.ts
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
export interface Milestone {
|
||||
id: string;
|
||||
title: string;
|
||||
status: string;
|
||||
phase?: string;
|
||||
nextAction?: string;
|
||||
}
|
||||
|
||||
export interface Slice {
|
||||
id: string;
|
||||
milestoneId: string;
|
||||
title: string;
|
||||
status: string;
|
||||
}
|
||||
|
||||
export interface Task {
|
||||
id: string;
|
||||
sliceId: string;
|
||||
milestoneId: string;
|
||||
title: string;
|
||||
status: string;
|
||||
}
|
||||
|
||||
export type UnitType = "milestone" | "slice" | "task";
|
||||
|
||||
export interface Unit {
|
||||
id: string;
|
||||
type: UnitType;
|
||||
status: string;
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue