<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Frontend Interview Prep — newest questions</title>
    <link>https://frontend-interview.com/</link>
    <atom:link href="https://frontend-interview.com/feed.xml" rel="self" type="application/rss+xml"/>
    <description>Free frontend interview prep: 265 worked JavaScript, TypeScript, React, system design &amp; DSA questions, each pairing the problem signal with its technique.</description>
    <language>en-US</language>
    <lastBuildDate>Sun, 30 Aug 2026 08:25:33 GMT</lastBuildDate>
    <item>
      <title>Function overloads vs generics vs unions</title>
      <link>https://frontend-interview.com/q/function-overloads-vs-generics-vs-unions.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/function-overloads-vs-generics-vs-unions.html</guid>
      <description>When should you use function overloads, and when is a generic or a union parameter the better tool?</description>
    </item>
    <item>
      <title>as const and literal types vs enum</title>
      <link>https://frontend-interview.com/q/as-const-and-literal-types-vs-enum.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/as-const-and-literal-types-vs-enum.html</guid>
      <description>What does `as const` do, and when would you prefer a literal union over a TypeScript enum?</description>
    </item>
    <item>
      <title>unknown vs any vs never</title>
      <link>https://frontend-interview.com/q/unknown-vs-any-vs-never.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/unknown-vs-any-vs-never.html</guid>
      <description>Explain the difference between unknown, any, and never, and when to use each.</description>
    </item>
    <item>
      <title>Write your own mapped + conditional type</title>
      <link>https://frontend-interview.com/q/write-your-own-mapped-conditional-type.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/write-your-own-mapped-conditional-type.html</guid>
      <description>Implement DeepReadonly and explain mapped types, keyof, and conditional types.</description>
    </item>
    <item>
      <title>Type guards &amp; narrowing</title>
      <link>https://frontend-interview.com/q/type-guards-and-narrowing.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/type-guards-and-narrowing.html</guid>
      <description>How does TS narrow types? Write a user-defined type guard, and show exhaustiveness with never.</description>
    </item>
    <item>
      <title>Model state with a discriminated union</title>
      <link>https://frontend-interview.com/q/model-state-with-a-discriminated-union.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/model-state-with-a-discriminated-union.html</guid>
      <description>Model an async request&apos;s state so impossible states are unrepresentable, and TS narrows correctly.</description>
    </item>
    <item>
      <title>Partial, Pick, Omit, Record — and when</title>
      <link>https://frontend-interview.com/q/partial-pick-omit-record-and-when.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/partial-pick-omit-record-and-when.html</guid>
      <description>Explain Partial, Required, Pick, Omit, and Record with a use case for each.</description>
    </item>
    <item>
      <title>Why generics? identity + a constrained generic</title>
      <link>https://frontend-interview.com/q/why-generics-identity-a-constrained-generic.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/why-generics-identity-a-constrained-generic.html</guid>
      <description>Explain generics with a concrete example. Then constrain a generic so it only accepts objects with an `id`.</description>
    </item>
    <item>
      <title>Recursive types &amp; type-safe object paths</title>
      <link>https://frontend-interview.com/q/recursive-types-and-type-safe-object-paths.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/recursive-types-and-type-safe-object-paths.html</guid>
      <description>Write a recursive type. Then build a `Paths ` that produces the dotted key paths of a nested object, and a `Get ` that returns the type at a path.</description>
    </item>
    <item>
      <title>Branded (nominal) types over a structural system</title>
      <link>https://frontend-interview.com/q/branded-nominal-types-over-a-structural-system.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/branded-nominal-types-over-a-structural-system.html</guid>
      <description>TypeScript is structural, so `UserId` and `OrderId` (both `string`) are interchangeable. How do you make them incompatible — and what&apos;s the cost?</description>
    </item>
    <item>
      <title>Variance &amp; function parameter bivariance</title>
      <link>https://frontend-interview.com/q/variance-and-function-parameter-bivariance.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/variance-and-function-parameter-bivariance.html</guid>
      <description>Explain covariance and contravariance for function types. Why are method parameters bivariant in TypeScript, and what does `strictFunctionTypes` change?</description>
    </item>
    <item>
      <title>Template literal types</title>
      <link>https://frontend-interview.com/q/template-literal-types.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/template-literal-types.html</guid>
      <description>What are template literal types? Build an event-handler name type from a union of events, and show inferring a piece back out of a string pattern.</description>
    </item>
    <item>
      <title>keyof, typeof, and indexed access types</title>
      <link>https://frontend-interview.com/q/keyof-typeof-and-indexed-access-types.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/keyof-typeof-and-indexed-access-types.html</guid>
      <description>Explain `keyof`, the `typeof` type operator, and indexed access types. Use them to write a fully type-safe property getter.</description>
    </item>
    <item>
      <title>The satisfies operator</title>
      <link>https://frontend-interview.com/q/the-satisfies-operator.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/the-satisfies-operator.html</guid>
      <description>What problem does `satisfies` solve that neither a type annotation nor `as` does? Show a config object where it matters.</description>
    </item>
    <item>
      <title>Tuples, readonly arrays, and named elements</title>
      <link>https://frontend-interview.com/q/tuples-readonly-arrays-and-named-elements.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/tuples-readonly-arrays-and-named-elements.html</guid>
      <description>How do you type a fixed-length tuple vs an array? Show named tuple members, a rest element, and `readonly` arrays — and why readonly matters.</description>
    </item>
    <item>
      <title>Type assertions: as, !, and why they&apos;re unsafe</title>
      <link>https://frontend-interview.com/q/type-assertions-as-and-why-they-re-unsafe.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/type-assertions-as-and-why-they-re-unsafe.html</guid>
      <description>Explain type assertions (`as T`), the non-null assertion (`!`), and `as unknown as T`. Why are they escape hatches rather than conversions?</description>
    </item>
    <item>
      <title>Structural typing &amp; excess-property checks</title>
      <link>https://frontend-interview.com/q/structural-typing-and-excess-property-checks.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/structural-typing-and-excess-property-checks.html</guid>
      <description>TypeScript uses structural typing, not nominal. What does that mean — and why does an object literal with an extra field error when a variable with the same shape doesn&apos;t?</description>
    </item>
    <item>
      <title>type vs interface — when to use which?</title>
      <link>https://frontend-interview.com/q/type-vs-interface-when-to-use-which.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/type-vs-interface-when-to-use-which.html</guid>
      <description>What&apos;s the difference between `type` and `interface`? When do you reach for each?</description>
    </item>
    <item>
      <title>Testing React components the user&apos;s way</title>
      <link>https://frontend-interview.com/q/testing-react-components-the-user-s-way.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/testing-react-components-the-user-s-way.html</guid>
      <description>How should you query and assert on a React component with Testing Library? Why &apos;by role&apos; over test IDs or class names?</description>
    </item>
    <item>
      <title>Code coverage: what it does and doesn&apos;t tell you</title>
      <link>https://frontend-interview.com/q/code-coverage-what-it-does-and-doesn-t-tell-you.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/code-coverage-what-it-does-and-doesn-t-tell-you.html</guid>
      <description>What does code coverage measure, and why is &apos;100% coverage&apos; not the same as &apos;well tested&apos;?</description>
    </item>
    <item>
      <title>Testing pure functions vs. side effects</title>
      <link>https://frontend-interview.com/q/testing-pure-functions-vs-side-effects.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/testing-pure-functions-vs-side-effects.html</guid>
      <description>Why are pure functions the easiest thing to test, and how do you make code with side effects testable?</description>
    </item>
    <item>
      <title>Test doubles: stub, mock, spy, fake</title>
      <link>https://frontend-interview.com/q/test-doubles-stub-mock-spy-fake.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/test-doubles-stub-mock-spy-fake.html</guid>
      <description>Define stub, spy, mock, and fake. When would you use each, and what&apos;s the risk of over-using them?</description>
    </item>
    <item>
      <title>Setup, teardown, and test isolation</title>
      <link>https://frontend-interview.com/q/setup-teardown-and-test-isolation.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/setup-teardown-and-test-isolation.html</guid>
      <description>What do beforeEach/afterEach do, and why is shared state between tests dangerous?</description>
    </item>
    <item>
      <title>Assertions and matchers: toBe vs. toEqual</title>
      <link>https://frontend-interview.com/q/assertions-and-matchers-tobe-vs-toequal.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/assertions-and-matchers-tobe-vs-toequal.html</guid>
      <description>What&apos;s the difference between toBe and toEqual? When do you reach for each, and what other matchers matter?</description>
    </item>
    <item>
      <title>Testing behavior, not implementation</title>
      <link>https://frontend-interview.com/q/testing-behavior-not-implementation.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/testing-behavior-not-implementation.html</guid>
      <description>What does it mean to test behavior rather than implementation details? Why does it matter?</description>
    </item>
    <item>
      <title>What NOT to test, and testing ROI</title>
      <link>https://frontend-interview.com/q/what-not-to-test-and-testing-roi.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/what-not-to-test-and-testing-roi.html</guid>
      <description>How do you decide what NOT to test? Explain testing ROI and the &apos;testing trophy&apos; vs. the pyramid.</description>
    </item>
    <item>
      <title>What makes a good unit test</title>
      <link>https://frontend-interview.com/q/what-makes-a-good-unit-test.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/what-makes-a-good-unit-test.html</guid>
      <description>What properties distinguish a good unit test from a bad one? What is the AAA structure?</description>
    </item>
    <item>
      <title>Test suite performance and parallelization</title>
      <link>https://frontend-interview.com/q/test-suite-performance-and-parallelization.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/test-suite-performance-and-parallelization.html</guid>
      <description>A test suite takes 20 minutes and blocks every PR. How do you make it fast without losing confidence?</description>
    </item>
    <item>
      <title>Visual regression testing</title>
      <link>https://frontend-interview.com/q/visual-regression-testing.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/visual-regression-testing.html</guid>
      <description>What is visual regression testing, what does it catch that DOM tests miss, and what makes it hard?</description>
    </item>
    <item>
      <title>Snapshot testing: value, pitfalls, and rot</title>
      <link>https://frontend-interview.com/q/snapshot-testing-value-pitfalls-and-rot.html</link>
      <guid isPermaLink="true">https://frontend-interview.com/q/snapshot-testing-value-pitfalls-and-rot.html</guid>
      <description>What is snapshot testing good and bad at? How do snapshots &apos;rot&apos;, and how do you use them responsibly?</description>
    </item>
  </channel>
</rss>
