mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
27 lines
498 B
TypeScript
27 lines
498 B
TypeScript
//// [tests/cases/conformance/jsx/tsxAttributeResolution4.tsx] ////
|
|
|
|
//// [file.tsx]
|
|
declare namespace JSX {
|
|
interface Element { }
|
|
interface IntrinsicElements {
|
|
test1: Attribs1;
|
|
}
|
|
}
|
|
interface Attribs1 {
|
|
x(n: string): void;
|
|
}
|
|
|
|
// OK
|
|
<test1 {... {x: (n) => 0} } />;
|
|
|
|
// Error, no member 'len' on 'string'
|
|
<test1 {... {x: (n) => n.len} } />;
|
|
|
|
|
|
//// [file.jsx]
|
|
"use strict";
|
|
// OK
|
|
<test1 {...{ x: (n) => 0 }}/>;
|
|
// Error, no member 'len' on 'string'
|
|
<test1 {...{ x: (n) => n.len }}/>;
|