Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.1.hello-world #8

Open
Absurd22 opened this issue Nov 11, 2022 · 0 comments
Open

1.1.hello-world #8

Absurd22 opened this issue Nov 11, 2022 · 0 comments
Assignees
Labels
answer 答案

Comments

@Absurd22
Copy link

// 你的答案
import './style.css';
import type { Equal, Expect, NotAny } from '@type-challenges/utils';
// Write TypeScript code!
const appDiv: HTMLElement = document.getElementById('app');
appDiv.innerHTML = `<h1>第一题:Hello World</h1><p> 你需要使得14行不会抛出异常</p>`;

// 期望是一个 string 类型
type HelloWorld = string;
//你需要使得如下这行不会抛出异常
type cases = [Expect<NotAny<HelloWorld>>, Expect<Equal<HelloWorld, string>>];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answer 答案
Projects
None yet
Development

No branches or pull requests

2 participants