diff --git a/docs/cron.html b/docs/cron.html index 8baa8b73..131e62a4 100644 --- a/docs/cron.html +++ b/docs/cron.html @@ -26,7 +26,7 @@ └───────────────────── 分钟 (0..59)
字段 | @@ -61,9 +61,9 @@, - * ? / L # |
---|
Example | @@ -120,9 +120,9 @@每次重启 (非标准) |
---|
特殊字符串 | @@ -163,9 +163,9 @@每小时运行一次,“0 * * * *” (非标准) |
---|
- | @@ -194,9 +194,9 @@crontab` |
---|
特殊字符 | @@ -233,7 +233,7 @@可以代替“*”并允许用于月份和星期几。使用仅限于 cron 表达式中的 月份中的某天 或 星期几 。 |
---|
nginx
- 要使用的镜像Example | @@ -90,11 +90,11 @@杀死一个容器 |
---|
参数 <container>
可以是容器 id 或名称
Description | @@ -135,9 +135,9 @@连接到现有容器 |
---|
Example | @@ -182,7 +182,7 @@列出对容器所做的更改 |
---|
docker create [options] IMAGE
-a, --attach # 附加标准输出/错误
@@ -211,7 +211,7 @@
Example |
@@ -256,7 +256,7 @@
推送镜像 |
---|
$ docker build .
$ docker build github.com/creack/docker-firefox
@@ -303,7 +303,7 @@
Docker 语法 | @@ -328,7 +328,7 @@将镜像上传到 docker hub。 |
---|
登录到注册表
$ docker login
@@ -351,7 +351,7 @@
$ docker push eon01/nginx localhost:5000/myadmin/nginx
实例 | @@ -372,7 +372,7 @@删除所有图像 |
---|
检查卷
$ docker volume ls
diff --git a/docs/git.html b/docs/git.html
index 67fd0ead..57037910 100644
--- a/docs/git.html
+++ b/docs/git.html
@@ -22,7 +22,7 @@
将存储库克隆到指定目录
$ git clone git_url 指定目录
-
在工作目录中显示修改后的文件,为您的下一次提交暂存
$ git status
@@ -238,7 +238,7 @@
# 远程有俩相同目录,通过这种方式清除掉,然后提交记录
$ git rm -r --cached <目录/文件>
-$ git rebase -i HEAD~3
# 表示要修改当前版本的倒数第三次状态
# 将要更改的记录行首单词 pick 改为 edit
diff --git a/docs/javascript.html b/docs/javascript.html
index 821107ec..0b5c1150 100644
--- a/docs/javascript.html
+++ b/docs/javascript.html
@@ -96,7 +96,7 @@
// 字符串插值
`Tommy is ${age} years old.`;
-var abc = "abcdefghijklmnopqrstuvwxyz";
var esc = 'I don\'t \n know'; // \n 换行
var len = abc.length; // 字符串长度
@@ -118,7 +118,7 @@
// 数字转为十六进制 (16)、八进制 (8) 或二进制 (2)
128.toString(16);
-var pi = 3.141;
pi.toFixed(0); // 返回 3
pi.toFixed(2); // 返回 3.14 - 使用金钱
@@ -167,7 +167,7 @@
// 随机整数,从 1
Math.floor(Math.random() * 5) + 1;
-// 像脚本代码一样执行字符串
eval();
// 从数字返回字符串
@@ -194,7 +194,7 @@
parseInt();
true || false; // true
10 > 5 || 10 > 20; // true
false || false; // false
@@ -304,7 +304,7 @@
return 'BOOM!';
}
-const sum = (param1, param2) => {
return param1 + param2;
@@ -364,7 +364,7 @@
}
function myFunction() {
var pizzaName = "Margarita";
// 这里的代码可以使用 PizzaName
@@ -604,7 +604,7 @@
// => 1
// => 2
-var num = 0;
outPoint:
@@ -629,7 +629,7 @@
// => orange
// => banana
-async function* asyncGenerator() {
var i = 0;
while (i < 3) {
@@ -656,7 +656,7 @@
i++;
}
-let plusFive = (number) => {
return number + 5;
@@ -705,7 +705,7 @@
return n > 5;
});
-const apple = {
color: 'Green',
@@ -731,7 +731,7 @@
};
console.log(classElection.place); // undefined
-const student = {
name: 'Sheldon',
score: 100,
@@ -786,7 +786,7 @@
// 通过引用,因此是可变的。
console.log(origObj.color);
-// 一个接受 'name','age' 和 'breed' 的工厂函数,
// 参数返回一个自定义的 dog 对象。
const dogFactory = (name, age, breed) => {
@@ -845,7 +845,7 @@
myCat.name = 'Yankee';
class Dog {
constructor(name) {
this._name = name;
@@ -999,7 +999,7 @@
console.log(myMath.duplicate(5)) // 10
创建 promises
new Promise((resolve, reject) => {
if (ok) {
@@ -1077,7 +1077,7 @@
console.error(err);
});
-const promise1 = new Promise((resolve, reject) => {
setTimeout(() => {
resolve(3);
@@ -1110,7 +1110,7 @@
console.error(err)
});
-const promise = new Promise((resolve, reject) => {
setTimeout(() => {
resolve('*');
@@ -1129,7 +1129,7 @@
promise.then(twoStars).then(oneDot).then(print);
function helloWorld() {
return new Promise(resolve => {
setTimeout(() => {
@@ -1226,7 +1226,7 @@
};
req.send();
-const data = { weight: '1.5 KG' };
const xhr = new XMLHttpRequest();
// 初始化一个请求。
@@ -1244,7 +1244,7 @@
console.log(xhr.response);
}
-fetch(url, {
method: 'POST',
headers: {
@@ -1291,7 +1291,7 @@
console.log(jsonResponse);
})
-const getSuggestions = async () => {
const wordQuery = inputField.value;
const endpoint = `${url}${queryParams}${wordQuery}`;
diff --git a/docs/jest.html b/docs/jest.html
index 47c1b0c4..807d6e96 100644
--- a/docs/jest.html
+++ b/docs/jest.html
@@ -21,7 +21,7 @@
快照, 轻松编写持续追踪大型对象的测试,并在测试旁或代码内显示实时快照。
代码覆盖, 无需其他操作,您仅需添加 --coverage 参数来生成代码覆盖率报告。
-
describe('makePoniesPink', () => {
beforeAll(() => {
/* 在所有测试之前运行 */
@@ -128,7 +128,7 @@
expect.anything(),
])
-// const fn = jest.fn()
// const fn = jest.fn().mockName('Unicorn') -- 命名为 mock, Jest 22+
// 函数被调用
@@ -248,7 +248,7 @@
toThrowError
→ toThrow
请参阅 Jest 文档中的 更多示例。
在异步测试中指定一些预期的断言是一个很好的做法,所以如果你的断言根本没有被调用,测试将会失败。
test('async test', () => {
@@ -271,7 +271,7 @@
expect(result).toBe(true)
})
-test('async test', (done) => {
expect.assertions(1)
@@ -300,7 +300,7 @@
从你的测试中 返回 一个 Promise
test('call the callback', () => {
const callback = jest.fn()
fn(callback)
@@ -387,7 +387,7 @@
.spyOn(location, 'title', 'set')
.mockImplementation(() => {})
-为使用本机计时器函数(setTimeout
、setInterval
、clearTimeout
、clearInterval
)的代码编写同步测试。
// 启用假计时器
jest.useFakeTimers()
@@ -425,7 +425,7 @@
set: setTitle,
})
-对于一个模拟
// 清除模拟使用日期
// (fn.mock.calls、fn.mock.instances)
diff --git a/docs/json.html b/docs/json.html
index a94145ce..2db89d75 100644
--- a/docs/json.html
+++ b/docs/json.html
@@ -36,7 +36,7 @@
}
类型 | @@ -73,9 +73,9 @@Null 或 Empty |
---|
@@ -120,7 +120,7 @@ | 后跟四个十六进制数字 |
---|
{
"url": "https://quickref.me",
@@ -132,29 +132,29 @@
{ "foo": 'bar' }
Have to be delimited by double quotes
-
Type | -Description | +类型 | +说明 |
---|---|---|---|
Integer |
- Digits 1-9, 0 and positive or negative | +数字 1-9、0 和正数或负数 | |
Fraction |
- Fractions like 0.3, 3.9 | +0.3、3.9 等分数 | |
Exponent |
- Exponent like e, e+, e-, E, E+, E | +指数,如 e、e+、e-、E、E+、E |
{
"positive" : 12,
@@ -247,7 +247,7 @@
};
@@ -276,8 +276,8 @@ | undefined |
---|
let myObject = {
"ref": {
"name": 0,
@@ -306,7 +306,7 @@
};
@@ -335,8 +335,8 @@ | undefined |
---|
let myArray = [
{
"name": "Jason",
@@ -365,7 +365,7 @@
];
@@ -394,7 +394,7 @@ | TypeError: Cannot read... |
---|
let myArray = [
"Jason",
@@ -406,7 +406,7 @@
];
@@ -427,7 +427,7 @@ | undefined |
---|
* Item 1
* Item 2
* item 3a
@@ -100,7 +100,7 @@
`Inline code` 周围有反引号
-| 左栏 | 中间栏 | 右栏 |
|:------------|:-------------:|-------------:|
| 单元格 1 | 居中 | $1600 |
@@ -113,7 +113,7 @@
单元格 2 | 单元格 3 | $12
Markdown 表格生成器:tableconvert.com
-

diff --git a/docs/package.json.html b/docs/package.json.html
index 0dae1007..3a4595fc 100644
--- a/docs/package.json.html
+++ b/docs/package.json.html
@@ -45,7 +45,7 @@
name 和 version 字段一起用于创建唯一ID
如果没有 name
和version
字段,您的包将无法安装
-
name
包name
包yarn add [包名]
# or
npm install [包名]
@@ -64,7 +64,7 @@
}
帮助使用者了解包的功能的字符串,包管理器也会把这个字符串作为搜索关键词。
-license
license
所有包都应该指定许可证,以便让用户了解他们是在什么授权下使用此包,以及此包还有哪些附加限制。
{
"license": "MIT",
@@ -97,7 +97,7 @@
}
是包的项目主页或者文档首页。
-repository
repository
{
"repository": {
"type": "git", "url": "https://github.com/user/repo.git"
@@ -128,7 +128,7 @@
}
作者信息,一个人。
-contributors
contributors
{
"contributors": [
{ "name": "Your Friend", "email": "friend@xxx.com", "url": "http://friends-xx.com" }
@@ -196,7 +196,7 @@
如果您的主声明文件名为 index.d.ts
并且位于包的根目录(index.js
旁边),则不需要标记 types
属性,建议这样做。
esnext
scripts
scripts
对于以下脚本,npm
支持 package.json
文件的 scripts
默认命令字段:
prepublish
: 在打包并发布包之前运行,以及在没有任何参数的本地 npm
安装之前运行。 (见下文)配置中的键作为环境变量公开给脚本(scripts)。
你的包很可能依赖其他包。你可以在你的 package.json
文件里指定那些依赖。
dependencies
dependencies
这些是你的包的开发版和发布版都需要的依赖。
{
"dependencies": {
@@ -306,7 +306,7 @@
你可以指定一个确切的版本、一个最小的版本 (比如 >=
) 或者一个版本范围 (比如 >= ... <
)。 包也可以指向本地的一个目录文件夹。
参考文档:npm docs.
-
{
"name": "my-workspaces-powered-project",
"workspaces": [
@@ -337,7 +337,7 @@
}
这些是只在你的包开发期间需要,但是生产环境不会被安装的包。
-peerDependencies
peerDependencies
{
"peerDependencies": {
"package-3": "^2.7.18"
@@ -378,7 +378,7 @@
你可以提供和你的包关联的系统级的信息,比如操作系统兼容性之类。
-engines
engines
指定使用你的包客户必须使用的版本,这将检查 process.versions
以及当前 yarn
版本。
{
"engines": {
@@ -411,7 +411,7 @@
}
如果你不想你的包发布到包管理器(npm 或者 私有包管理),设置为 true
。
publishConfig
publishConfig
这些配置值将在你的包发布时使用。比如,你可以给包打标签。
{
"publishConfig": {
@@ -429,7 +429,7 @@
}
请注意,如果你的 package.json
包含 "flat": true
并且其它包依赖你的包 (比如你在构建一个库,而不是应用), 其它那些包也需要在它们的 package.json
加上 "flat": true
,或者在命令行上用 yarn install --flat
安装。
resolutions
resolutions
{
"resolutions": {
"transitive-package-1": "0.0.29",
diff --git a/docs/quickreference.html b/docs/quickreference.html
new file mode 100644
index 00000000..2e27229f
--- /dev/null
+++ b/docs/quickreference.html
@@ -0,0 +1,417 @@
+
+
+
+
+Quick Reference 备忘清单
+ & quickreference cheatsheet & Quick Reference
+
+
+
+
+
+Quick Reference 备忘清单
+这是您可以在 Quick Reference 备忘单上使用的样式参考,快速参与贡献!
+入门
+本地编译预览
+简单的将仓库克隆下来本地调试页面展示。
+克隆仓库
+git clone git@github.com:jaywcjlove/reference.git
+
+安装依赖编译生成 HTML 页面
+npm i # 安装依赖
+npm run build # 编译输出 HTML
+
+HTML 存放在仓库根目录下的 dist
目录中,将 dist/index.html
静态页面在浏览器中打开预览。
+介绍
+在备忘清单采用 HTML 注释语法
,标识网站布局和一些样式,目的是为了在 GitHub
中也是正常毫无瑕疵的预览 Markdown
。
+### 卡片标题
+<!--rehype:wrap-class=col-span-2-->
+
+卡片 Markdown 内容展示,下面注释语法为文字内容改变样式
+<!--rehype:style=color: red;-->
+
+使用 col-span-2
类标识,卡片占 2
列位置
+注释语法介绍
+
+ - 在某个 Markdown 语法下方或者后面,添加 HTML注释
+ - 以
<!--rehype:
开始,-->
结束,包裹参数内容
+ - 内容采用 URL 参数的字符拼接方式
+
+语法
+<!--rehype:
+ key=value
+ &
+ key=value
+ -->
标识开始
+ 参数
+ 分隔符
+ 参数
+ 标识结束
+示例
+### H2 部分
+<!--rehype:body-class=cols-2-->
+
+### H3 部分
+<!--rehype:wrap-class=row-span-2-->
+
+示例,三行占位,标题红色
+### 标题
+<!--rehype:wrap-class=row-span-3&style=color:red;-->
+
+参数说明
+
+
+
+ 类
+ 说明
+
+
+
+
+ body-style
+ 包裹所有卡片外壳
的样式
+
+
+ body-class
+ 用于卡片栏布局,添加类
名
+
+
+ wrap-style
+ 卡片栏添加 CSS 样式
+
+
+ wrap-class
+ 用于卡片占位,添加类
名
+
+
+
+文字颜色
+_我是红色_<!--rehype:style=color: red;-->
+**加粗红色**<!--rehype:style=color: red;-->
+
+上面添加注释样式,文字 我是红色 文字变红
了
+文字大小
+**加粗变大红色**
+<!--rehype:style=color: red;font-size: 18px-->
+
+上面添加注释样式,文字 加粗变大红色 变红
并且大
了
+强制换行
+\```js
+function () {}
+\```
+<!--rehype:className=wrap-text -->
+
+如果代码块内容太长,使用强制换行类解决
+展示表格表头
+| Key | value |
+| ---- | ---- |
+| `键` | 值 |
+<!--rehype:className=show-header-->
+
+注释配置添加 show-header
类,放置在表格下面,表头将被展示出来。
+布局
+H2 部分
+H2 部分
+---
+
+### 卡片 1 (H3 部分)
+### 卡片 2 (H3 部分)
+### 卡片 3 (H3 部分)
+
+上面实例 H2 部分
标题下面有三个卡片
,默认 3
栏布局。
+H2 部分
+---
+<!--rehype:body-class=cols-2-->
+### 卡片 1 (H3 部分)
+### 卡片 2 (H3 部分)
+### 卡片 3 (H3 部分)
+
+使用注释配置为 H2 部分 添加 col-span-2
类,将 3
栏布局变成 2
栏布局。
+
+
+
+ 类
+ 说明
+
+
+
+
+ cols-1
+ 1
栏卡片布局
+
+
+ cols-2
+ 2
栏卡片布局
+
+
+ cols-3
+ 3
栏卡片布局
+
+
+ cols-4
+ 4
栏卡片布局
+
+
+ cols-5
+ 5
栏卡片布局
+
+
+
+占位布局 style 写法
+### H3 部分
+<!--rehype:wrap-style=grid-row: span 2/span 2;-->
+
+放在 ### H3 部分
下面的注释配置,与 <!--rehype:wrap-class=row-span-2-->
相同,设置 2 行占位布局。
+卡片栏布局 style 写法
+## H2 部分
+<!--rehype:body-style=grid-template-columns: repeat(2,minmax(0,1fr));-->
+
+放在 ## H2 部分
下面的注释配置,与 <!--rehype:body-class=cols-2-->
相同,设置 2 栏布局。
+H3 部分
+### 卡片 1 (H3 部分)
+<!--rehype:wrap-class=row-span-2-->
+### 卡片 2 (H3 部分)
+<!--rehype:wrap-class=col-span-3-->
+### 卡片 3 (H3 部分)
+
+
+
+
+ 类
+ 说明
+
+
+
+
+ col-span-2
+ 2
列占位
+
+
+ col-span-3
+ 3
列占位
+
+
+ col-span-4
+ 4
列占位
+
+
+ row-span-2
+ 2
行占位
+
+
+ row-span-3
+ 3
行占位
+
+
+ row-span-4
+ 4
行占位
+
+
+
+卡片 1 列布局
+╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮
+┆ H3 Title 1 ┆
+╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
+╭┈┈┈╮ ╭┈┈┈╮ ╭┈┈┈╮
+┆ 2 ┆ ┆ 3 ┆ ┆ 4 ┆
+╰┈┈┈╯ ╰┈┈┈╯ ╰┈┈┈╯
+
+Markdown 源码
+### H3 Title 1
+<!--rehype:wrap-class=col-span-3-->
+### Title 2
+
+### Title 3
+
+### Title 4
+
+默认 3 列布局,第一标题添加 col-span-3
占位类
+表格
+基本表格
+Date
+
+
+
+
+
+
+
+
+
+ %m/%d/%Y
+ 06/05/2013
+
+
+ %A, %B %e, %Y
+ Sunday, June 5, 2013
+
+
+ %b %e %a
+ Jun 5 Sun
+
+
+
+Time
+
+
+
+
+
+
+
+
+
+ %H:%M
+ 23:05
+
+
+ %I:%M %p
+ 11:05 PM
+
+
+
+标题为 H4
的基本表格。
+快捷键
+
+
+
+
+
+
+
+
+
+ V
+ Vector
+
+
+ P
+ Pencil
+
+
+ T
+ Text
+
+
+ L
+ Line
+
+
+ R
+ Rectangle
+
+
+ O
+ Oval
+
+
+ U
+ Rounded
+
+
+
+展示标题
+
+
+
+ Prefix
+ Example
+ What
+
+
+
+
+ //
+ //hr[@class='edge']
+ Anywhere
+
+
+ ./
+ ./a
+ Relative
+
+
+ /
+ /html/body/div
+ Root
+
+
+
+<!--rehype:className=show-header-->
+列表
+一栏(默认)
+
+ - Item 1
+ - Item 2
+ - Item 3
+
+四列
+
+ - Item 1
+ - Item 2
+ - Item 3
+ - Item 4
+ - Item 5
+ - Item 6
+ - Item 7
+ - Item 8
+
+<!--rehype:className=cols-4-->
+没有标记
+
+ - Item 1
+ - Item 2
+ - Item 3
+ - Item 4
+ - Item 5
+ - Item 6
+
+<!--rehype:className=cols-3 style-none-->
+H2 部分 - 5列效果展示
+One
+...
+
+Two
+...
+
+Three
+...
+
+Four
+...
+
+Five
+...
+
+H3 部分 - 占位效果展示
+row-span-2
+...
+
+<!--rehype:wrap-class=row-span-2-->
+col-span-2
+...
+
+<!--rehype:wrap-class=col-span-2-->
+红色标题
+...
+
+<!--rehype:style=background:#e91e63;-->
+黄色标题
+...
+
+<!--rehype:style=background:#d7a100;-->
+col-span-3
+...
+
+卡片子项
+每个部分可以有以下子项:
+H4 子标题
+
+ - pre
+ - table
+ - ul
+
+H4 子标题
+
+ - pre
+ - table
+ - ul
+
+H3 部分
+每个盒子(卡片)都是一个 H3
部分。 盒子将包含 H3
自身内的所有东西。
+这是一个包含段落的基本部分。
+
+
+
diff --git a/docs/semver.html b/docs/semver.html
index b0291f23..31f1388e 100644
--- a/docs/semver.html
+++ b/docs/semver.html
@@ -19,7 +19,7 @@
npm 的语义版本器 (npmjs.com)
- | @@ -40,7 +40,7 @@当你做了向下兼容的问题修正 |
---|
1.2.3
=1.2.3
@@ -49,8 +49,8 @@
>=1.2.3
请注意,后缀版本(1.2.3-rc1
)不匹配。
范围 | @@ -125,9 +125,9 @@
---|
范围 | @@ -140,9 +140,9 @@是 >=1.2.3 <=2.3.4 |
---|
范围 | @@ -159,9 +159,9 @@是 >=1.2.3 <3.0.0 |
---|
范围 | @@ -174,11 +174,11 @@是 1.2.0 - 2.3.0 |
---|
当右侧为部分(例如,2.3
)时,假定缺失的部分为x
(例如, 2.3.x
)。
如果左边是部分的(例如,1.2
),则假定缺少的部分为0
(例如, 1.2.0
)。
范围 | @@ -195,12 +195,12 @@或 (双竖线分隔) |
---|
1.2.3-prerelease+build
范围 | @@ -225,7 +225,7 @@表示定义了公共 API |
---|
这个 Sketch 快速参考备忘单显示了它的键盘快捷键和命令。
快捷键 | -插入 | +描述 | (Text) 文本 | -
---|
快捷键 | @@ -125,9 +125,9 @@特殊字符 |
---|
画布视图 | @@ -196,9 +196,9 @@移动画布 |
---|
快捷键 | @@ -235,9 +235,9 @@进入全屏 |
---|
编辑形状 | @@ -282,9 +282,9 @@更改矢量点样式 |
---|
快捷键 | @@ -333,9 +333,9 @@切换边框 |
---|
排列图层、组和画板 | @@ -404,7 +404,7 @@选择下面的页面 |
---|
array1 = [ "Don't mix", "different", "types" ]
array2 = [ [ 1.2, 2.4 ], ["all", 'strings', """are the same""", '''type'''] ]
array3 = [
@@ -119,7 +119,7 @@
[table1.nested_table]
baz = "bat"
-[[comments]]
author = "Nate"
text = "Great Article!"
@@ -175,7 +175,7 @@
[ g . h .i ] # same as [g.h.i]
[ j . "ʞ" .'l' ] # same as [j."ʞ".'l']
-name = { first = "Tom", last = "Preston-Werner" }
point = { x = 1, y = 2 }
animal = { type.name = "pug" }
diff --git a/docs/typescript.html b/docs/typescript.html
index 685345f1..4b0b8b95 100644
--- a/docs/typescript.html
+++ b/docs/typescript.html
@@ -47,7 +47,7 @@
Object, String, Number, Boolean
-/** 可选择从现有接口或类型(Response, HTTPAble)中获取属性 */
interface JSONResponse extends Response, HTTPAble {
version: number;
@@ -172,7 +172,7 @@
const data: import("./data").data
这些功能非常适合构建库、描述现有的 JavaScript 代码,您可能会发现在大多数 TypeScript 应用程序中很少使用它们。
-
type JSONResponse = {
version: number; // 字段
/** In bytes */ // 附加文档
@@ -201,7 +201,7 @@
// void, bio: (nv: string) => void }
类似于类型系统的映射语句,允许输入类型更改新类型的结构。
-type SupportedLangs = "en" | "pt" | "zh";
type FooterLocaleIDs = "header" | "footer";
type AllLocaleIDs = `${SupportedLangs}_${FooterLocaleIDs}_id`;
@@ -210,7 +210,7 @@
// | "pt_header_id" | "pt_footer_id"
// | "zh_header_id" | "zh_footer_id"
-type HasFourLegs<Animal> = Animal extends { legs: 4 } ? Animal : never
type Animals = Bird | Dog | Ant | Wolf;
type FourLegs = HasFourLegs<Animals>
@@ -251,7 +251,7 @@
input // number[]
}
-const data1 = {
name: "Zagreus"
}
@@ -369,7 +369,7 @@
所以,小心不要这样做:
class C implements Bag {}
-
// 确保类符合一组接口或类型 ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈▶┈┈╮
// 子类这个类 ┈┈┈┈┈┈┈┈↘ ┈┈┈┈┈┈┈┈┈┈┈┈┈┴┈┈┈┈┈┈┈
class User extends Account implements Updatable, Serializable {
@@ -438,7 +438,7 @@
class Dog extends Animal { getName(): { ... } }
一个类可以被声明为不可实现,但可以在类型系统中被子类化。 class 成员也可以。
-import { Syncable, triggersSync, preferCache, required } from "mylib"
@Syncable
@@ -822,7 +822,7 @@
}
}
-interface FooProp {
name: string;
X: number;
@@ -857,7 +857,7 @@
// ...
}
-interface MenuProps extends React.LiHTMLAttributes<HTMLUListElement> { ... }
const InternalMenu = (props: MenuProps, ref?: React.ForwardedRef<HTMLUListElement>) => (
<ul {...props} ref={ref} />
@@ -876,7 +876,7 @@
<Menu.Item /> // ✅ ok
<Menu.SubMenu /> // ✅ ok
-declare namespace JSX {
interface ElementClass {
render: any;
@@ -900,7 +900,7 @@
<NotAValidFactoryFunction />; // ❌ error
默认情况下,JSX.ElementClass
是 {},但可以对其进行扩展,以将 JSX
的使用限制为仅限于符合适当接口的类型。
type Props = {
header: React.ReactNode;
body: React.ReactNode;
diff --git a/docs/vscode.html b/docs/vscode.html
index 76854edf..bc549631 100644
--- a/docs/vscode.html
+++ b/docs/vscode.html
@@ -13,7 +13,7 @@
这个 VSCode (Visual Studio Code) 快速参考备忘单显示了它的键盘快捷键和命令。
- | @@ -46,9 +46,9 @@键盘快捷键 |
---|
- | @@ -157,9 +157,9 @@切换自动换行 |
---|
- | @@ -208,9 +208,9 @@切换 Tab 移动焦点 |
---|
- | @@ -247,9 +247,9 @@切换区分大小写/正则表达式/整个单词 |
---|
- | @@ -306,9 +306,9 @@列(框)选择页上/下 |
---|
- | @@ -365,9 +365,9 @@更改文件语言 |
---|
- | @@ -404,9 +404,9 @@移动活动编辑器组 |
---|
- | @@ -471,9 +471,9 @@在新窗口/实例中显示活动文件 |
---|
- | @@ -542,9 +542,9 @@Zen 模式(Esc Esc 退出) |
---|
- | @@ -605,7 +605,7 @@滚动到顶部/底部 |
---|