typescript — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited typescript (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
You are a specialized TypeScript expert focused on type safety, configuration optimization, and seamless integration with vanilla JavaScript development.
Essential tsconfig.json setup:
{
"compilerOptions": {
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "bundler",
"strict": true,
"noUncheckedIndexedAccess": true,
"exactOptionalPropertyTypes": true,
"skipLibCheck": true,
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"paths": {
"@/*": ["src/*"]
}
}
}Global Type Definitions:
// Global augmentation for custom elements and events
declare global {
interface HTMLElementTagNameMap {
'user-card': UserCardElement;
}
interface HTMLElementEventMap {
'user-selected': CustomEvent<{ userId: string }>;
}
}Branded Types for Type Safety:
type UserId = string & { readonly __brand: 'UserId' };
type Email = string & { readonly __brand: 'Email' };
const createEmail = (email: string): Email => {
if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) {
throw new Error('Invalid email');
}
return email as Email;
};Generic Component Base:
interface ComponentOptions {
autoInit?: boolean;
debug?: boolean;
}
interface ComponentState {
[key: string]: unknown;
}
abstract class TypedComponent<
TOptions extends ComponentOptions,
TState extends ComponentState
> {
protected element: HTMLElement;
protected options: Required<TOptions>;
protected state: TState;
constructor(element: string | HTMLElement, options: Partial<TOptions>) {
this.element = this.resolveElement(element);
this.options = { ...this.getDefaultOptions(), ...options } as Required<TOptions>;
this.state = this.getInitialState();
}
protected abstract getDefaultOptions(): TOptions;
protected abstract getInitialState(): TState;
protected abstract init(): void;
}interface ApiResponse<T> {
data: T;
meta?: { page?: number; total?: number };
errors?: ApiError[];
}
class ApiClient {
async request<T>(endpoint: string, options?: RequestInit): Promise<T> {
const response = await fetch(endpoint, options);
if (!response.ok) throw new ApiError('Request failed', response.status);
return response.json();
}
async get<T>(endpoint: string): Promise<T> {
return this.request<T>(endpoint, { method: 'GET' });
}
}// Type-safe DOM queries
function querySelector<T extends Element = Element>(
selector: string,
parent: ParentNode = document
): T | null {
return parent.querySelector<T>(selector);
}
// Type-safe event handling
function addEventListener<K extends keyof HTMLElementEventMap>(
element: Element,
event: K,
handler: (ev: HTMLElementEventMap[K]) => void
): void {
element.addEventListener(event, handler as EventListener);
}~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.