```ts
export function countStripTilings(width: number): number {
  if (!Number.isInteger(width) || width < 0) {
    throw new Error("Width must be a non-negative integer.");
  }

  // Base cases
  if (width === 0) return 1;
  if (width === 1) return 1;

  // DP array to store the number of ways to tile up to each width
  const dp: number[] = [1, 1];

  // Fill the DP array using the recurrence relation
  for (let i = 2; i <= width; i++) {
    dp[i] = dp[i - 1] + dp[i - 2] + 2 * dp[i - 3];
  }

  return dp[width];
}
```