TypeScript 编译器选项的完整参考指南。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| "compilerOptions": { | |
| "strict": true, | |
| "target": "ES2020", | |
| "module": "ES2022", | |
| "lib": ["ES2020", "DOM", "DOM.Iterable"], | |
| "moduleResolution": "bundler", | |
| "baseUrl": ".", | |
| "paths": { | |
| "@/*": ["./src/*"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import module java.net.http; | |
| private static final HttpClient HTTP_CLIENT = HttpClient.newBuilder() | |
| .followRedirects(HttpClient.Redirect.NORMAL) | |
| .connectTimeout(Duration.ofSeconds(10)) | |
| .build(); | |
| void main() { | |
| var mavenRepo = Optional.ofNullable(System.getenv("MAVEN_REPO")).filter(s -> !s.isBlank()).orElse("https://repo1.maven.org/maven2"); | |
| IO.println("Using Maven repository: " + mavenRepo); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export function changeInputValue(input, value) { | |
| if (input) { | |
| const nativeInputValueSetter = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value').set | |
| nativeInputValueSetter.call(input, value) | |
| const inputEvent = new Event('input', { bubbles: true }) | |
| input.dispatchEvent(inputEvent) | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name piaotia-amend | |
| // @namespace piaotia-amend | |
| // @match https://www.piaotia.com/* | |
| // @grant none | |
| // @version 1.0 | |
| // @author Aerbeilu | |
| // @description 2025/2/15 15:54:23 | |
| // ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Method 1. git http + proxy http | |
| git config --global http.proxy "http://127.0.0.1:1080" | |
| git config --global https.proxy "http://127.0.0.1:1080" | |
| # Method 2. git http + proxy shocks | |
| git config --global http.proxy "socks5://127.0.0.1:1080" | |
| git config --global https.proxy "socks5://127.0.0.1:1080" | |
| # to unset | |
| git config --global --unset http.proxy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| open -n -a 'Google Chrome' 'https://github.com/' --args --user-data-dir='/tmp/chrome_dev_0' --disable-web-security --allow-running-insecure-content |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState } from 'react' | |
| import styled from '@emotion/styled' | |
| import murmur3 from '../../utils/murmurhash3_32.js' | |
| const Container = styled.div` | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| flex-direction: column; | |
| height: 75vh; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component, useRef } from 'react' | |
| import styled from '@emotion/styled' | |
| import { sleep } from '../../utils/schedule.js' | |
| const Container = styled.div` | |
| box-sizing: border-box; | |
| position: relative; | |
| display: flex; | |
| flex-direction: column; | |
| justify-content: center; |
NewerOlder