Skip to main content

typescript

TypeScript coding standards and conventions including file naming rules

الانتقال إلى التثبيت

معلومات المصدر

المستودع
forcedotcom/apex-language-support
آخر نشاط في المصدر
٢٣ يونيو ٢٠٢٦ في ٢٢:١٦
لغة SKILL.md المكتشفة
الإنجليزية
النجوم
١١
التفرعات
٣

خيارات التثبيت

يُحدَّد Prompt الذي يراجع المصدر أولًا بشكل افتراضي. يمكنك التبديل إلى أمر مباشر أو تنزيل نسخة محلية.

مراجعة ملفات المصدر

اقرأ SKILL.md وأي ملفات مرافقة يعرضها SkillsMP قبل أن تقرر التثبيت.

مستكشف الملفات
2 ملفات

عرض SKILL.md

SKILL.md
تعليمات المصدر · معاينة للقراءة فقط
name
typescript
description
TypeScript coding standards and conventions including file naming rules
- new file copyright header: use year **2026** (e.g. `Copyright (c) 2026, salesforce.com, inc.`) - no barrel files - avoid type assertions (`as Foo` or `as unknown as` or `Foo!`). do guards or Effect.schema stuff (ex `is`) instead - no `void` for async - use async/effect (exception [vscode-window-messages](../vscode-window-messages/SKILL.md)) - no `export *` - name exports explicitly - prefer `undefined` over null (unless server requires null) - prefer `undefined` over empty string - prefer map/filter over loops/conditionals - avoid mutation - avoid `any` - no enums or namespaces (enums compile to weird JS; use string union types instead; exception: interfaces defined outside this repo that we can't change) - no runtime errors for developer mistakes (use types to ensure exhaustive switch/case; don't throw for null/undefined when input/consumer is within our control) - avoid fallbacks unless absolutely necessary — a fallback path is usually a bandaid on a bug that should be fixed upstream. Fix the root cause; don't paper over it with a default/alternate path that hides the real failure. If a fallback is genuinely required, comment why the upstream fix isn't possible. - .ts filenames: camelCase, no hyphens, no leading capitals - preserve comments when refactoring; remove if wrong/obsolete - exported functions: single-line jsdoc /\*_ foo _/ if name unclear; no params/return (TS provides types) - look for uses of (Object|Map).groupBy instead of older patterns LSP position indexing and VS Code web extension constraints: [references/lsp-and-web-extension.md](references/lsp-and-web-extension.md)
عرض على GitHub