Vskills Certified TypeScript Developer — Questions and Answers
Question 1: Which HIPAA safeguard category specifically covers technical controls such as encryption and audit logs in a TypeScript healthcare application?
- Physical Safeguards
- Technical Safeguards (Correct answer)
- Organizational Requirements
- Administrative Safeguards
Correct answer: Technical Safeguards
HIPAA Technical Safeguards cover technology-based controls—encryption, access controls, and audit logging—used to protect ePHI.
Question 2: What is a static class member in TypeScript?
- A member that belongs to the class itself and is shared across all instances (Correct answer)
- A member that belongs to an instance of the class
- A member that is only available in abstract classes
- A member that cannot be accessed after declaration
Correct answer: A member that belongs to the class itself and is shared across all instances
Static members are declared with the `static` keyword and belong to the class constructor rather than any instance, accessed via `ClassName.member`.
Question 3: Which legal doctrine allows a developer to study and interoperate with a proprietary TypeScript library without infringing its copyright?
- Contributory infringement defense
- Fair use / interoperability exception (Correct answer)
- Trademark nominative use
- Patent exhaustion
Correct answer: Fair use / interoperability exception
Fair use and statutory interoperability exceptions (e.g., in the EU Software Directive and US case law) permit reverse engineering for the purpose of achieving interoperability.
Question 4: When a TypeScript open-source contributor submits a PR that fixes a bug but introduces a breaking change to the public API, the ethical standard requires:
- Clearly documenting the breaking change, bumping the major version, and providing a migration guide (Correct answer)
- Reverting the fix to preserve API stability
- Implementing the fix only for paid customers
- Merging silently since the bug fix is more important
Correct answer: Clearly documenting the breaking change, bumping the major version, and providing a migration guide
Breaking changes must be communicated via a major version bump and migration guide to honor the semver contract with existing users.
Question 5: A developer asks the team lead whether to use 'readonly' on object properties in domain models. What is the correct guidance?
- readonly should only be applied to arrays, not object properties
- No, readonly adds unnecessary verbosity and slows development
- Yes, use readonly on domain model properties to prevent accidental mutation and make immutability intent explicit (Correct answer)
- Only use readonly in classes, not in interfaces or type aliases
Correct answer: Yes, use readonly on domain model properties to prevent accidental mutation and make immutability intent explicit
readonly properties communicate immutability intent and prevent mutation bugs that are difficult to trace at runtime.
Question 6: What does `import type { Foo } from './foo'` do differently than `import { Foo } from './foo'`?
- It imports Foo as a module namespace object
- It imports only the type information, which is fully erased in the compiled JavaScript (Correct answer)
- It imports the value and the type together for runtime use
- It makes the import lazy and returns a Promise
Correct answer: It imports only the type information, which is fully erased in the compiled JavaScript
`import type` guarantees the import is type-only and is completely removed during compilation, ensuring it never appears in the emitted JavaScript.
Question 7: Your TypeScript library is published to npm. Which tsconfig option generates `.d.ts` files so consumers get type information?
- declaration: true (Correct answer)
- noEmit: true
- emitDecoratorMetadata: true
- outFile: true
Correct answer: declaration: true
`declaration: true` instructs TypeScript to emit `.d.ts` files alongside compiled JavaScript, providing type info to library consumers.
Question 8: Which approach is recommended when a TypeScript project needs to share type definitions between a frontend and backend in a monorepo?
- Generate types from the backend's runtime values using typeof
- Create a shared `types` package referenced by both frontend and backend (Correct answer)
- Copy-paste type definitions into both packages
- Use `any` on the boundary to avoid coupling
Correct answer: Create a shared `types` package referenced by both frontend and backend
A shared `types` package ensures the frontend and backend agree on data shapes, catching type mismatches at compile time.
Question 9: Which TypeScript feature can be used to prevent a numeric ID type from being accidentally passed where a string ID type is expected, reducing mis-wiring risk?
- Enabling strictBindCallApply
- Branded (nominal) types using intersection with a unique tag (Correct answer)
- Using number literals for all IDs
- Declaring both types as type aliases of the same base type
Correct answer: Branded (nominal) types using intersection with a unique tag
Branding adds a phantom property that distinguishes structurally identical types, so passing a numeric brand where a string brand is required causes a compile error.
Question 10: Which `tsconfig.json` option enforces that all switch statement cases are exhaustively handled using never-type checks?
- noImplicitReturns
- strictNullChecks
- noFallthroughCasesInSwitch (Correct answer)
- useUnknownInCatchVariables
Correct answer: noFallthroughCasesInSwitch
`noFallthroughCasesInSwitch` causes a compiler error when a switch case falls through to the next without a break or return.
Question 11: Under the Americans with Disabilities Act (ADA) as applied to web applications, a TypeScript-built web app must generally:
- Offer a downloadable TypeScript-only version of the app
- Register with the Department of Justice before launch
- Meet WCAG accessibility guidelines to be usable by people with disabilities (Correct answer)
- Provide source code to users with disabilities on request
Correct answer: Meet WCAG accessibility guidelines to be usable by people with disabilities
US courts have applied the ADA to websites, generally requiring conformance with WCAG 2.1 Level AA so that users with disabilities have equal access.
Question 12: When adding a new team member to a TypeScript project, which file should they check first to understand the compiler configuration and strictness level?
- .babelrc
- .eslintrc.json
- package.json
- tsconfig.json (Correct answer)
Correct answer: tsconfig.json
`tsconfig.json` defines the TypeScript compiler options including strictness flags, target environment, and module resolution strategy.
Question 13: What is the correct way to define function overloads in TypeScript?
- Use the `overload` keyword before each variant
- Use union types in both parameter and return positions only
- Define multiple function bodies with the same name
- Declare multiple call signatures before a single implementation signature (Correct answer)
Correct answer: Declare multiple call signatures before a single implementation signature
TypeScript function overloads require declaring multiple call signatures followed by a single implementation signature that handles all overload cases.
Question 14: In a TypeScript project, what is the role of `husky` and `lint-staged` in the development workflow?
- They manage TypeScript version upgrades automatically
- They generate `.d.ts` files for JavaScript dependencies
- They run linting and type checks only on staged files before each commit (Correct answer)
- They compile TypeScript faster using caching
Correct answer: They run linting and type checks only on staged files before each commit
`husky` sets up Git hooks and `lint-staged` runs scripts (lint, format, type check) only on staged files to keep commits clean.
Question 15: In a TypeScript expense tracker, `keyof Transaction` produces which type if `Transaction = { id: number; amount: number; category: string }`?
- string[]
- 'id' | 'amount' | 'category' (Correct answer)
- { id: number; amount: number; category: string }
- number | string
Correct answer: 'id' | 'amount' | 'category'
`keyof T` produces a union of the string literal types of all keys in T.
Question 16: What does the `tsc --watch` command do in a TypeScript project?
- Runs TypeScript tests in watch mode
- Starts a TypeScript language server
- Watches files for changes and recompiles automatically (Correct answer)
- Compiles TypeScript once and exits
Correct answer: Watches files for changes and recompiles automatically
`tsc --watch` continuously monitors source files and recompiles whenever a change is detected.
Question 17: Which tsconfig setting helps manage the risk of accidentally shipping development-only debug code to production?
- Setting target to ES3 in production
- Using paths aliases for debug modules
- Enabling declaration in production builds
- removeComments combined with a production-specific tsconfig that strips debug imports (Correct answer)
Correct answer: removeComments combined with a production-specific tsconfig that strips debug imports
A separate production tsconfig can exclude debug files and strip comments, reducing the risk of exposing internal logic or performance-heavy debug code.
Question 18: What does `isolatedModules: true` in tsconfig.json enforce and why is it a good QA practice?
- It prevents circular imports between modules
- It ensures each file can be safely transpiled independently without cross-file type info, catching re-export-only patterns (Correct answer)
- It prevents importing from node_modules
- It isolates test files from production code
Correct answer: It ensures each file can be safely transpiled independently without cross-file type info, catching re-export-only patterns
`isolatedModules` errors on constructs like `export { MyType }` that require type information to distinguish from value exports, ensuring compatibility with transpilers like Babel or esbuild.
Question 19: A financial dashboard uses `Record<Category, number>` to track spending. What does this type enforce?
- The object is immutable
- Keys are numbers, values are Category strings
- Every Category key must map to a number value (Correct answer)
- Only one entry per category is allowed
Correct answer: Every Category key must map to a number value
`Record<K, V>` constructs an object type with keys of type K and values of type V, ensuring complete coverage of all category keys.
Question 20: In a TypeScript reporting app, what is the purpose of using 'as const' on a tuple of column names?
- It widens string literals to the string type
- It narrows types to literal values, enabling safer indexed access (Correct answer)
- It converts the tuple to a regular array
- It makes the array mutable
Correct answer: It narrows types to literal values, enabling safer indexed access
as const preserves string literal types in tuples, allowing TypeScript to enforce that only valid column names are used as indexes.
Question 21: What is the difference between fixed and variable costs in TypeScript practice?
- There is no meaningful difference between them
- Variable costs are optional while fixed costs are mandatory
- Fixed costs are always higher than variable costs
- Fixed costs remain constant regardless of activity level; variable costs change with production volume (Correct answer)
Correct answer: Fixed costs remain constant regardless of activity level; variable costs change with production volume
Fixed costs (rent, insurance, salaries) remain constant regardless of output level, while variable costs (materials, commissions, utilities) fluctuate directly with the volume of activity or production.
Question 22: What are the various TypeScript components?
- Language Service
- Language
- Compiler
- All of the above (Correct answer)
Correct answer: All of the above
Explanation: <br> In TypeScript, there are three main sorts of components to choose from: Syntax, keywords, and type annotations are all part of the language. TypeScript Compiler (tsc) This compiler (tsc) converts TypeScript instructions to JavaScript equivalents.
Question 23: You need a TypeScript function that calculates tax differently based on income bracket. Which technique allows different parameter and return type combinations for the same function name?
- Conditional types
- Generic constraints
- Function overloads (Correct answer)
- Declaration merging
Correct answer: Function overloads
Function overloads let you declare multiple signatures for a function, enabling different input/output type pairs for the same function.
Question 24: What is a discriminated union in TypeScript and how does it help QA?
- A union where all members share a common literal property used for type narrowing (Correct answer)
- A union that is automatically resolved by the compiler
- A union that only includes primitive types
- A union where members cannot overlap
Correct answer: A union where all members share a common literal property used for type narrowing
Discriminated unions use a shared literal 'tag' field so TypeScript can narrow the type in switch/if blocks, ensuring all cases are handled.
Question 25: What risk does enabling 'declaration: true' without also enabling 'declarationMap' introduce for library consumers?
- Consumers cannot trace type definitions back to source, making debugging harder (Correct answer)
- Tree-shaking becomes impossible
- Bundlers will duplicate module imports
- The library will not compile at all
Correct answer: Consumers cannot trace type definitions back to source, making debugging harder
Without declarationMap, the .d.ts files lack source mapping, so consumers cannot jump to the original TypeScript source when debugging type issues.
Question 26: What is emotional intelligence in TypeScript leadership?
- Avoiding all emotional expression in the workplace
- Being emotional during all professional interactions
- Having a high IQ score on standardized tests
- The ability to recognize, understand, and manage one's own emotions and those of others (Correct answer)
Correct answer: The ability to recognize, understand, and manage one's own emotions and those of others
Emotional intelligence encompasses self-awareness, self-regulation, motivation, empathy, and social skills—enabling leaders to navigate interpersonal dynamics, build relationships, and make sound decisions.
Question 27: A TypeScript developer reuses a colleague's code in a new open-source project without attribution. This violates which professional principle?
- Type safety guidelines
- Dependency injection principles
- Intellectual property and attribution standards (Correct answer)
- Encapsulation
Correct answer: Intellectual property and attribution standards
Proper attribution of others' work is an ethical obligation and may also be a legal requirement under certain licenses.
Question 28: What does enabling `strictPropertyInitialization` in TypeScript enforce that relates to professional coding standards?
- That all interfaces must match class signatures exactly
- That class properties are initialized in the constructor or declared with a definite assignment assertion (Correct answer)
- That all properties must be optional
- That readonly properties cannot be reassigned anywhere
Correct answer: That class properties are initialized in the constructor or declared with a definite assignment assertion
`strictPropertyInitialization` ensures class properties are properly initialized, preventing runtime errors from undefined property access.
Vskills Certified TypeScript Developer
The TypeScript certification exam validates knowledge of TypeScript language features including static types, interfaces, classes, generics, modules, decorators, and advanced type patterns used in professional web and application development.
Exam Rules
- You can skip questions and return to them later
- Flag questions for review before submitting
- No feedback shown until you submit the entire exam
- Unanswered questions count as wrong — answer everything
- 10 pretest questions are mixed in and don't affect your score
- Timer auto-submits when time runs out
- Your progress is auto-saved every 30 seconds