← Boeing Interview Insights

Boeing·Software Engineer·Technical Phone Screen·Senior

SeniorPrefer not to say
Mar 2026

Summary

Technical phone screen for a full-stack role at Boeing. One deep TypeScript question that took up most of the time, felt more like a type-theory lecture than a typical frontend interview.

Questions Asked (1)

Q1

How does structural typing differ from nominal typing, and how would you emulate nominal typing in TypeScript using branded or opaque types?

Technical Trade-offsSystem Design
Author's notes

I knew TypeScript uses structural typing and could explain the basics fine.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clearly defining structural typing (shape-based) and nominal typing (name-based), contrasting their trade-offs in flexibility vs. safety. Then explain how TypeScript's structural type system can be augmented with branded types to emulate nominal typing, and provide a concrete example. Finally, discuss practical implications, especially in safety-critical domains like Boeing.

Pro tip: Emphasize that branded types are a compile-time-only construct with zero runtime overhead, and mention that they can prevent entire classes of bugs by making invalid states unrepresentable—a key principle in safety-critical systems.

1. Define structural vs. nominal typing

Explain that structural typing checks compatibility based on the shape of types (properties and methods), while nominal typing requires explicit declarations or inheritance. Give examples: TypeScript is structural; Java/C# are nominal.

2. Highlight trade-offs

Discuss how structural typing offers flexibility and ease of composition but can lead to unintended type compatibility. Nominal typing provides stronger guarantees and clearer intent but can be more verbose and less flexible.

3. Introduce branded types in TypeScript

Explain that branded types use a phantom property (e.g., a unique symbol or a string literal) to create a distinct type that is incompatible with the base type. Show a simple example: `type UserId = string & { __brand: 'UserId' }`.

4. Demonstrate emulation of nominal typing

Show how to create and use branded types: define a constructor function that casts to the branded type, and illustrate that you cannot accidentally pass a plain string where a UserId is expected. Mention that this enforces nominal-like behavior at compile time.

5. Connect to real-world impact

Relate to Boeing's context: in safety-critical systems, preventing mix-ups between semantically different but structurally identical types (e.g., meters vs. feet, or different IDs) is crucial. Branded types help catch such errors at compile time without runtime cost.

Key Points to Mention

  • Structural typing: compatibility based on members; nominal typing: compatibility based on explicit declarations.
  • TypeScript uses structural typing by default, which can lead to accidental type compatibility.
  • Branded types use a phantom property (e.g., unique symbol) to create a nominal-like distinction.
  • Branded types are erased at runtime, so no performance overhead.
  • Use cases: preventing primitive obsession, distinguishing semantically different IDs, units of measure.
  • In safety-critical systems, making invalid states unrepresentable is a key design principle.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.