marius-townhouse
@marius-townhouse
Public Skills
dry-types
by marius-townhouse
Use when duplicating type definitions. Use when interfaces share common fields. Use when types can be derived from other types.
generics-as-functions
by marius-townhouse
Use when defining generic types or functions. Use when constraining type parameters. Use when writing type-level code. Use when documenting generic types.
avoid-wrapper-types
by marius-townhouse
Use when typing primitives. Use when tempted to use String, Number, Boolean. Use when wrapper types appear in errors.
imprecise-over-inaccurate
by marius-townhouse
Use when types become too complex. Use when precision causes false positives. Use when accuracy is uncertain.
no-null-in-aliases
by marius-townhouse
Use when defining type aliases. Use when null/undefined appears in type definitions. Use when types are confusing.
currying-inference
by marius-townhouse
Use when generic types aren't inferred. Use when builder patterns need better types. Use when creating new inference sites.
noimplicitany-completion
by marius-townhouse
Use when finishing TypeScript migration. Use when enabling strict mode. Use when finalizing tsconfig. Use when ensuring type safety. Use when completing adoption.
compiler-performance
by marius-townhouse
Use when build times are slow. Use when optimizing TypeScript projects. Use when configuring project references. Use when dealing with large codebases. Use when improving IDE responsiveness.
no-type-in-docs
by marius-townhouse
Use when writing comments about types. Use when documenting function parameters. Use when naming variables.
codegen-over-complex-types
by marius-townhouse
Use when types become extremely complex. Use when types mirror external schemas. Use when maintaining type-to-schema mappings. Use when types require extensive type-level logic. Use when types drift from data sources.
different-variables-types
by marius-townhouse
Use when tempted to reuse variables. Use when variable changes type. Use when using union types for multiple purposes.
index-signature-alternatives
by marius-townhouse
Use when defining object types with dynamic keys. Use when tempted to use index signatures. Use when parsing CSV or JSON data.
limit-any-type
by marius-townhouse
Use when tempted to use any type. Use when getting type errors that seem hard to fix. Use when migrating JavaScript to TypeScript.
function-type-expressions
by marius-townhouse
Use when writing multiple functions with same signature. Use when implementing callbacks. Use when matching existing function types.
exclusive-or-properties
by marius-townhouse
Use when exactly one of several properties should be present. Use when modeling mutually exclusive options. Use when building component props with alternative configurations. Use when designing API parameters that have variants.
branded-types
by marius-townhouse
Use when primitive types need semantic distinction. Use when string or number types have different meanings. Use when you need nominal typing.
exhaustiveness-checking
by marius-townhouse
Use when handling tagged unions. Use when adding new cases to discriminated unions. Use when switch statements must cover all cases.
functional-constructs-types
by marius-townhouse
Use when building arrays in loops. Use when types don't flow through code. Use when considering map/filter/reduce.
control-union-distribution
by marius-townhouse
Use when conditional types behave unexpectedly with unions. Use when boolean or never types cause surprises. Use when needing to prevent distribution over unions. Use when recursive generic types don't distribute.
accurate-environment-model
by marius-townhouse
Use when defining global types. Use when augmenting window. Use when typing environment variables. Use when working with build-time constants. Use when configuring type definitions.
liberal-accept-strict-return
by marius-townhouse
Use when designing function signatures. Use when creating APIs. Use when parameters have optional fields but return types feel too broad.
module-augmentation
by marius-townhouse
Use when extending third-party types. Use when adding properties to existing interfaces. Use when plugins extend core types. Use when declaration merging is needed. Use when augmenting global types.
context-type-inference
by marius-townhouse
Use when extracting values causes type errors. Use when callback types are wrong. Use when const assertions are needed.
consistent-aliases
by marius-townhouse
Use when narrowing doesn't work as expected. Use when using variables for object properties. Use when refinements are lost.