File: nestedFreshLiteral.errors.txt

package info (click to toggle)
node-typescript 5.0.4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 459,140 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (21 lines) | stat: -rw-r--r-- 884 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
tests/cases/compiler/nestedFreshLiteral.ts(12,21): error TS2322: Type '{ colour: string; }' is not assignable to type 'CSSProps'.
  Object literal may only specify known properties, but 'colour' does not exist in type 'CSSProps'. Did you mean to write 'color'?


==== tests/cases/compiler/nestedFreshLiteral.ts (1 errors) ====
    interface CSSProps  {
      color?: string
    }
    interface NestedCSSProps {
      nested?: NestedSelector
    }
    interface NestedSelector  {
      prop: CSSProps;
    }
    
    let stylen: NestedCSSProps = {
      nested: { prop: { colour: 'red' } }
                        ~~~~~~~~~~~~~
!!! error TS2322: Type '{ colour: string; }' is not assignable to type 'CSSProps'.
!!! error TS2322:   Object literal may only specify known properties, but 'colour' does not exist in type 'CSSProps'. Did you mean to write 'color'?
    }