File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
fixtures/components/string-intersection Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+ // SPDX-License-Identifier: Apache-2.0
3+ import * as React from 'react' ;
4+
5+ export namespace CodeEditorProps {
6+ // This simulates the pattern used in the code editor where we want:
7+ // 1. Autocomplete for known language literals
8+ // 2. Allow custom string values
9+ export type Language = 'javascript' | 'html' | 'ruby' | 'python' | 'java' | ( string & { _ ?: undefined } ) ;
10+ }
11+
12+ export interface CodeEditorProps {
13+ /**
14+ * Specifies the programming language.
15+ */
16+ language : CodeEditorProps . Language ;
17+ }
18+
19+ export default function CodeEditor ( { language } : CodeEditorProps ) {
20+ return < div data-language = { language } > Code Editor</ div > ;
21+ }
Original file line number Diff line number Diff line change 1+ {
2+ "extends" : " ../tsconfig.json" ,
3+ "include" : [" ./**/*.tsx" ]
4+ }
You can’t perform that action at this time.
0 commit comments