{"action":"created","comment":{"url":"https://api.github.com/repos/veizz/tech-translation/pulls/comments/124196636","pull_request_review_id":46463177,"id":124196636,"diff_hunk":"@@ -0,0 +1,304 @@\n+#             开始使用 TypeScript 和 React\n+[Tom Dale](https://medium.com/@tomdale/glimmer-js-whats-the-deal-with-typescript-f666d1a3aad0)    和其他人有一些关于 TypeScript 比较好的博文，跟随这些博文，我最近开始使用 TypeScript。今天，我将展示如何使用 scratch 建立一个 TypeScript 工程，以及如何使用 Webpack 管理构建过程。我也将陈述关于 TypeScript 的最初感想，尤其是使用 TypeScript 和 ReactJS。\n+\n+我不会深入到 TypeScript 语法的具体细节，你可以阅读 [TypeScript handbook](https://www.typescriptlang.org/docs/tutorial.html) 或者 免费书籍[TypeScript Deep Dive](https://basarat.gitbooks.io/typescript/content/docs/getting-started.html)，它们是关于 TypeScript 比较好的入门材料。\n+\n+**更新：**如果你想用德语阅读这篇文章，你可以 [thanks to the awesome folks at Reactx.de](https://reactx.de/artikel/reactjs-typescript/)\n+\n+## 安装配置 TypeScript\n+第一步要做的事情是使用 Yarn 将 TypeScript 安装到本地的 `node_modules` 目录，首先，使用 `yarn init` 创建一个工程：\n+\n+```shell\n+yarn init\n+yarn add typescript\n+```\n+当你安装了 TypeScript，你就可以使用 `tsc` 命令行工具，这个工具可以编译 TypeScript，编译时会创建一个开始文件 `tsconfig.json`，你可以编辑这个文件。你可以运行 `tsc --init` 获得这个文件-如果你已经在本地安装了 `TypeScript`，你需要运行 `./node_modules/.bin/tsc --init`。\n+\n+**注意：**[你可以在我的dotfiles中看到](https://github.com/jackfranklin/dotfiles/blob/master/zsh/zshrc#L101)，我将 `$PATH` 定义为 `./node_modules/.bin` 这个目录。这有点危险，因为我可能不经意地运行这个目录下的任何可执行的文件，但是我愿意承担这个风险，因为我知道这个目录下安装了什么，而且这能节省很多打字时间！\n+\n+`tsc --init` 这个命令会产生一个 `tsconfig.json` 文件，所有 TypeScript`编译器的配置都存在于这个文件中。在默认配置的基础上，我做了一些改变，下面是我正在用的一个配置：\n+\n+```shell\n+{\n+  \"compilerOptions\": {\n+    \"module\": \"es6\", // use ES2015 modules\n+    \"target\": \"es6\", // compile to ES2015 (Babel will do the rest)\n+    \"allowSyntheticDefaultImports\": true, // see below\n+    \"baseUrl\": \"src\", // enables you to import relative to this folder\n+    \"sourceMap\": true, // make TypeScript generate sourcemaps\n+    \"outDir\": \"ts-build\", // output directory to build to (irrelevant because we use Webpack most of the time)\n+    \"jsx\": \"preserve\", // enable JSX mode, but \"preserve\" tells TypeScript to not transform it (we'll use Babel)\n+    \"strict\": true,\n+  },\n+  \"exclude\": [\n+    \"node_modules\" // don't run on any code in the node_modules directory\n+  ]\n+}\n+```\n+allowSyntheticDefaultImports\n+\n+将这个属性的值设置为 true，它允许你使用 ES2015 默认的导入 imports 风格, 即使你导入的代码没有使用 ES2015 默认的导出。\n+\n+举个例子，当你导入不是用 ES2015 编写的 React 时（虽然源码是，但是 React 使用一个构建好的版本），就可以利用上面的属性设置。这意味着，在技术上，[它]没有ES2015默认输出，所以当你导入时， TypeScript 会告诉你这样做。尽管如此，像 Webpack 这样的构建工具能够导入正确的代码， 所以我将这个属性设置为 true，因为相比使用 `import * as React from 'react'`，我更喜欢 `import React from 'react'`这种方式。\n+\n+strict:true\n+\n+[TypeScript 2.3 版本](https://github.com/Microsoft/TypeScript/wiki/What's-new-in-TypeScript#new---strict-master-option)引入了一种新的配置选项，`strict`。当将这个值设置为 true 时，TypeScript 编译器会尽可能的严格——如果你将一些 JS 转为 TS，这可能不是你想要的，但是对于一些新的项目，使其尽可能的严格是有意义的。这还引入了一些不同的配置，比较常见的有 `noImplicitAny` 和 `strictNullChecks`:\n+\n+noImplicitAny\n+将 TypeScript 引入一个现有的项目，当你不声明变量的类型时，TypeScript 不会抛出错误。但是，当我使用 scratch 新建一个 TypeScript 项目，我希望编译器尽可能地严格。\n+TypeScript 默认做的一件事是将变量设置为 `any` 类型。`any` 是T ypeScript 中避免类型检查的有效手段，它可以是任何值。当你转换 JavaScript 时，使用 `any` 是很有用的，但是最好还是尽可能地严格。当将 noImplicitAny 设置为 true，你必须为变量设置类型。举个例子，当将 `noImplicitAny` 设置为 true 时，下面的代码会报错：\n+\n+```shell\n+function log(thing) {\n+  console.log('thing', thing)\n+}\n+```\n+如果你想了解更多关于 noImplicitAny 的话，可以阅读[TypeScript Deep Dive](https://basarat.gitbooks.io/typescript/docs/options/noImplicitAny.html)\n+\n+strictNullChecks\n+\n+这是另一个使 TypeScript 编译器严格的选项。TypeScript Deep Dive 这本书[有一个很大的章节介绍这个选项](https://basarat.gitbooks.io/typescript/docs/options/strictNullChecks.html)。如果将这个选项设置为true，TypeScript 会更容易识别出你引用的一个可能是 undefined 值的地方，并将展示这个错误。例如：\n+\n+```shell\n+person.age.increment()\n+```\n+当将 strictNullChecks 设置为 true，TypeScript 会认为 person 或者 person.age 可能是 undefined，只有当你处理了这个错误它才不会报错。这会阻止运行时错误，所以这是一个从一开始就避免错误出现的非常好的选项。\n+\n+## 配置 Webpack, Babel and TypeScript\n+\n+我是一个超级 Webpack 迷；我喜欢它的插件生态系统，喜欢开发工作流，喜欢它擅长管理复杂的应用和构建管道。所以，即使我们可能仅仅使用 TypeScript 编译器，我仍然喜欢引入 Webpack。因为 TypeScript 编译器输出 ES2015 + React，所以我们需要 Babel 做这项工作。让我们安装 Webpack，Babel，相关的 presets 和[ts-loader](https://github.com/TypeStrong/ts-loader)，ts-loader 是 TypeScript 在 Webpack 中的插件。\n+\n+还有 [awesome-typescript-loader](https://github.com/s-panferov/awesome-typescript-loader) ，也是 TypeScript 在 Webpack 中的插件，但是我首先找到的是 `ts-loader` 而且到目前为止它非常不错。如果谁使用了 `awesome-typescript-loader` ,我很乐意听关于它们两者的对比。\n+\n+```shell\n+yarn add webpack babel-core babel-loader babel-preset-es2015 babel-preset-react ts-loader webpack-dev-server\n+```\n+\n+此时此刻，我必须感谢Tom Duncalf,他在博客中发表的[TypeScript 1.9 + React](http://blog.tomduncalf.com/posts/setting-up-typescript-and-react/)，对我来说，是一个特别好的开始，我极力推荐它。\n+\n+在 Webpack 中没有特别的配置，但是我还是在代码中列出一些注释来解释它：\n+\n+```shell\n+const webpack = require('webpack')\n+const path = require('path')\n+\n+module.exports = {\n+  // put sourcemaps inline\n+  devtool: 'eval',\n+\n+  // entry point of our application, within the `src` directory (which we add to resolve.modules below):\n+  entry: [\n+    'index.tsx'\n+  ],\n+\n+  // configure the output directory and publicPath for the devServer\n+  output: {\n+    filename: 'app.js',\n+    publicPath: 'dist',\n+    path: path.resolve('dist')\n+  },\n+\n+  // configure the dev server to run \n+  devServer: {\n+    port: 3000,\n+    historyApiFallback: true,\n+    inline: true,\n+  },\n+\n+  // tell Webpack to load TypeScript files\n+  resolve: {\n+    // Look for modules in .ts(x) files first, then .js\n+    extensions: ['.ts', '.tsx', '.js'],\n+\n+    // add 'src' to the modules, so that when you import files you can do so with 'src' as the relative route\n+    modules: ['src', 'node_modules'],\n+  },\n+\n+  module: {\n+    loaders: [\n+      // .ts(x) files should first pass through the Typescript loader, and then through babel\n+      { test: /\\.tsx?$/, loaders: ['babel-loader', 'ts-loader'], include: path.resolve('src') }\n+    ]\n+  },\n+}\n+```\n+\n+我们按照上面的方式配置 loaders ，从而使 `.ts(x)` 文件首先经过 `ts-loader` 的处理。按照 `tsconfig.json` 中的配置，使用 TypeScript 编译 `.ts(x)` 文件 —— 在 `ES2015`中发布。然后，我们使用 Babel 对它进行降级到ES5 。我创建了一个包含presets的 `.babelrc` 文件：\n+\n+```shell\n+{\n+  \"presets\": [\"es2015\", \"react\"]\n+}\n+```\n+\n+现在我们已经做好了写TypeScript应用的准备。\n+\n+## 写一个 TypeScript React 组件\n+现在，我们准备好建立 `src/index.tsx` ,这是我们这个应用的入口。我们可以创建一个虚拟的组件，渲染它，查看它是否正常运行。\n+\n+```shell\n+import React from 'react'\n+import ReactDOM from 'react-dom'\n+\n+const App = () => {\n+  return (\n+    <div>\n+      <p>Hello world!</p>\n+    </div>\n+  )\n+}\n+\n+ReactDOM.render(<App />, document.getElementById('app'))\n+```\n+\n+如果你运行webpack，会看到下面的错误：\n+\n+```shell\n+ERROR in ./src/index.tsx\n+(1,19): error TS2307: Cannot find module 'react'.\n+\n+ERROR in ./src/index.tsx\n+(2,22): error TS2307: Cannot find module 'react-dom'.\n+```\n+\n+发生上面的错误是因为 TypeScript 试图确认 React 的类型，React 输出了什么。对于 React DOM ，TypeScript 会做同样的事情。在 TypeScript 中，React 并没有被授权，所以 TypeScript 并没有包含相关信息。幸运地是，在这种情况下，社区已经创建了 [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped) ，这是一个对于模块来说很大的类型库。\n+\n+最近，安装机制改变了；在 npm `@types` scope 下，所有的类型被发布。为了获得 React 和 ReactDOM 的类型，我们运行下面的命令：\n+\n+```shell\n+yarn add @types/react\n+yarn add @types/react-dom\n+```\n+通过上面的处理，错误不见了。无论何时，你安装一个依赖时，都应该试着安装 `@types` 包，或者你想查看是否有被支持的类型，你可以在 [TypeSearch](https://microsoft.github.io/TypeSearch/) 网站上查看。\n+\n+## 本地运行app\n+为了在本地运行 app，我们只需要运行 `webpack-dev-server` 命令。我设置了一个 script， `start`, 它能做上面的事情：\n+\n+```shell\n+\"scripts\": {\n+  \"start\": \"webpack-dev-server\"\n+}\n+```\n+\n+服务会找到 webpack.config.json 这个文件，使用它创建我们的应用。\n+\n+如果你运行 `yarn start` ,你会看到来自于服务的输出，包含 `ts-loader` 的输出，这些能够确认应用是否正常运行。\n+\n+```shell\n+$ webpack-dev-server\n+Project is running at http://localhost:3000/\n+webpack output is served from /dist\n+404s will fallback to /index.html\n+ts-loader: Using typescript@2.3.0 and /Users/jackfranklin/git/interactive-react-introduction/tsconfig.json\n+Version: webpack 2.4.1\n+Time: 6077ms\n+ Asset     Size  Chunks                    Chunk Names\n+app.js  1.14 MB       0  [emitted]  [big]  main\n+webpack: Compiled successfully.\n+```\n+我创建了一个 `index.html` 文件，它能够加载编译后的代码：\n+\n+```shell\n+<!DOCTYPE html>\n+<html lang=\"en\">\n+  <head>\n+    <meta charset=\"UTF-8\">\n+    <title>My Typescript App</title>\n+  </head>\n+  <body>\n+    <div id=\"app\"></div>\n+    <script src=\"dist/app.js\"></script>\n+  </body>\n+</html>\n+```\n+\n+在端口3000，我们将会看到 `Hello world!` ,我们让 `TypeScript` 运行了！\n+\n+## 定义一个模块类型\n+在现在的工程中，我想使用 [React Ace module](https://github.com/securingsincity/react-ace)包含一个代码编辑器。但是，没有针对于 React Ace module 的模块类型，并且也没有 `@types/react-ace` 。在这种情况下，我们必须在我们的应用中增加类型，这样可以使 TypeScript 知道它的类型。这看起来非常烦人，使用 TypeScript 的好处至少是知道所有的第三方依赖，这样会节省调试时间。\n+\n+定义一个只包含类型的文件，后缀是 `.d.ts` ('d' 代表 ‘declaration’)，你可以从 [TypeScript docs](https://www.typescriptlang.org/docs/handbook/declaration-files/introduction)了解更多。在你的工程中，TypeScript将会自动地找到这些文件，你不需要显式地导入它们。\n+\n+我创建了 `react-ace.d.ts` 文件，添加下面的代码，创建模块，作为一个默认导出的 React 组件。\n+\n+```shell\n+declare module 'react-ace' {\n+    interface ReactAceProps {\n+      mode: string\n+      theme: string\n+      name: string\n+      editorProps?: {}\n+      showPrintMargin?: boolean\n+      minLines?: number\n+      maxLines?: number\n+      wrapEnabled?: boolean\n+      value: string\n+      highlightActiveLine?: boolean\n+      width?: string\n+      fontSize?: number\n+    }\n+\n+    const ReactAce: React.ComponentClass<ReactAceProps>\n+    export = ReactAce\n+}\n+```\n+\n+我首先创建了一个 TypeScript 接口，这个接口包含组件的属性，`export = ReactAce` 标明组件通过模块被导出。通过定义属性的类型，TypeScript 会告诉我是否弄错了属性的类型或者忘记设置一个类型，这是非常有价值的。\n+\n+## 测试\n+最后，通过配置 TypeScript，我们会有一个好的测试。我是 Facebook’s [Jest](https://facebook.github.io/jest/) 的超级粉丝，我在 google 上做了一些搜索，确认它是否能用 TypeScript 运行。结果发现，这是可行的，[`ts-jest`](https://www.npmjs.com/package/ts-jest) 包可以做一些很重的转换。除此之外，还有一个做类型检查的 `@types/jest` 包。","path":"TODO/getting-started-with-TypeScript-and-React.md","position":250,"original_position":250,"commit_id":"1c77dfa8fc9f710304f5dbef6369825c9ffb573f","original_commit_id":"1c77dfa8fc9f710304f5dbef6369825c9ffb573f","user":{"login":"veizz","id":1176926,"avatar_url":"https://avatars0.githubusercontent.com/u/1176926?v=3","gravatar_id":"","url":"https://api.github.com/users/veizz","html_url":"https://github.com/veizz","followers_url":"https://api.github.com/users/veizz/followers","following_url":"https://api.github.com/users/veizz/following{/other_user}","gists_url":"https://api.github.com/users/veizz/gists{/gist_id}","starred_url":"https://api.github.com/users/veizz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/veizz/subscriptions","organizations_url":"https://api.github.com/users/veizz/orgs","repos_url":"https://api.github.com/users/veizz/repos","events_url":"https://api.github.com/users/veizz/events{/privacy}","received_events_url":"https://api.github.com/users/veizz/received_events","type":"User","site_admin":false},"body":"Facebook的Jest","created_at":"2017-06-27T07:29:32Z","updated_at":"2017-06-27T07:29:32Z","html_url":"https://github.com/veizz/tech-translation/pull/1#discussion_r124196636","pull_request_url":"https://api.github.com/repos/veizz/tech-translation/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/veizz/tech-translation/pulls/comments/124196636"},"html":{"href":"https://github.com/veizz/tech-translation/pull/1#discussion_r124196636"},"pull_request":{"href":"https://api.github.com/repos/veizz/tech-translation/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/veizz/tech-translation/pulls/1","id":127621197,"html_url":"https://github.com/veizz/tech-translation/pull/1","diff_url":"https://github.com/veizz/tech-translation/pull/1.diff","patch_url":"https://github.com/veizz/tech-translation/pull/1.patch","issue_url":"https://api.github.com/repos/veizz/tech-translation/issues/1","number":1,"state":"open","locked":false,"title":"add new translation","user":{"login":"luxjpp","id":23469423,"avatar_url":"https://avatars2.githubusercontent.com/u/23469423?v=3","gravatar_id":"","url":"https://api.github.com/users/luxjpp","html_url":"https://github.com/luxjpp","followers_url":"https://api.github.com/users/luxjpp/followers","following_url":"https://api.github.com/users/luxjpp/following{/other_user}","gists_url":"https://api.github.com/users/luxjpp/gists{/gist_id}","starred_url":"https://api.github.com/users/luxjpp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luxjpp/subscriptions","organizations_url":"https://api.github.com/users/luxjpp/orgs","repos_url":"https://api.github.com/users/luxjpp/repos","events_url":"https://api.github.com/users/luxjpp/events{/privacy}","received_events_url":"https://api.github.com/users/luxjpp/received_events","type":"User","site_admin":false},"body":"hao","created_at":"2017-06-27T06:38:58Z","updated_at":"2017-06-27T07:29:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"82ee40b11c6e77bc699adcc08641f5c66e48f7ae","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/veizz/tech-translation/pulls/1/commits","review_comments_url":"https://api.github.com/repos/veizz/tech-translation/pulls/1/comments","review_comment_url":"https://api.github.com/repos/veizz/tech-translation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/veizz/tech-translation/issues/1/comments","statuses_url":"https://api.github.com/repos/veizz/tech-translation/statuses/1c77dfa8fc9f710304f5dbef6369825c9ffb573f","head":{"label":"luxjpp:TODO/getting-started-with-TypeScript-and-React","ref":"TODO/getting-started-with-TypeScript-and-React","sha":"1c77dfa8fc9f710304f5dbef6369825c9ffb573f","user":{"login":"luxjpp","id":23469423,"avatar_url":"https://avatars2.githubusercontent.com/u/23469423?v=3","gravatar_id":"","url":"https://api.github.com/users/luxjpp","html_url":"https://github.com/luxjpp","followers_url":"https://api.github.com/users/luxjpp/followers","following_url":"https://api.github.com/users/luxjpp/following{/other_user}","gists_url":"https://api.github.com/users/luxjpp/gists{/gist_id}","starred_url":"https://api.github.com/users/luxjpp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luxjpp/subscriptions","organizations_url":"https://api.github.com/users/luxjpp/orgs","repos_url":"https://api.github.com/users/luxjpp/repos","events_url":"https://api.github.com/users/luxjpp/events{/privacy}","received_events_url":"https://api.github.com/users/luxjpp/received_events","type":"User","site_admin":false},"repo":{"id":95088298,"name":"tech-translation","full_name":"luxjpp/tech-translation","owner":{"login":"luxjpp","id":23469423,"avatar_url":"https://avatars2.githubusercontent.com/u/23469423?v=3","gravatar_id":"","url":"https://api.github.com/users/luxjpp","html_url":"https://github.com/luxjpp","followers_url":"https://api.github.com/users/luxjpp/followers","following_url":"https://api.github.com/users/luxjpp/following{/other_user}","gists_url":"https://api.github.com/users/luxjpp/gists{/gist_id}","starred_url":"https://api.github.com/users/luxjpp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luxjpp/subscriptions","organizations_url":"https://api.github.com/users/luxjpp/orgs","repos_url":"https://api.github.com/users/luxjpp/repos","events_url":"https://api.github.com/users/luxjpp/events{/privacy}","received_events_url":"https://api.github.com/users/luxjpp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/luxjpp/tech-translation","description":"技术类文章翻译","fork":true,"url":"https://api.github.com/repos/luxjpp/tech-translation","forks_url":"https://api.github.com/repos/luxjpp/tech-translation/forks","keys_url":"https://api.github.com/repos/luxjpp/tech-translation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/luxjpp/tech-translation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/luxjpp/tech-translation/teams","hooks_url":"https://api.github.com/repos/luxjpp/tech-translation/hooks","issue_events_url":"https://api.github.com/repos/luxjpp/tech-translation/issues/events{/number}","events_url":"https://api.github.com/repos/luxjpp/tech-translation/events","assignees_url":"https://api.github.com/repos/luxjpp/tech-translation/assignees{/user}","branches_url":"https://api.github.com/repos/luxjpp/tech-translation/branches{/branch}","tags_url":"https://api.github.com/repos/luxjpp/tech-translation/tags","blobs_url":"https://api.github.com/repos/luxjpp/tech-translation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/luxjpp/tech-translation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/luxjpp/tech-translation/git/refs{/sha}","trees_url":"https://api.github.com/repos/luxjpp/tech-translation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/luxjpp/tech-translation/statuses/{sha}","languages_url":"https://api.github.com/repos/luxjpp/tech-translation/languages","stargazers_url":"https://api.github.com/repos/luxjpp/tech-translation/stargazers","contributors_url":"https://api.github.com/repos/luxjpp/tech-translation/contributors","subscribers_url":"https://api.github.com/repos/luxjpp/tech-translation/subscribers","subscription_url":"https://api.github.com/repos/luxjpp/tech-translation/subscription","commits_url":"https://api.github.com/repos/luxjpp/tech-translation/commits{/sha}","git_commits_url":"https://api.github.com/repos/luxjpp/tech-translation/git/commits{/sha}","comments_url":"https://api.github.com/repos/luxjpp/tech-translation/comments{/number}","issue_comment_url":"https://api.github.com/repos/luxjpp/tech-translation/issues/comments{/number}","contents_url":"https://api.github.com/repos/luxjpp/tech-translation/contents/{+path}","compare_url":"https://api.github.com/repos/luxjpp/tech-translation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/luxjpp/tech-translation/merges","archive_url":"https://api.github.com/repos/luxjpp/tech-translation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/luxjpp/tech-translation/downloads","issues_url":"https://api.github.com/repos/luxjpp/tech-translation/issues{/number}","pulls_url":"https://api.github.com/repos/luxjpp/tech-translation/pulls{/number}","milestones_url":"https://api.github.com/repos/luxjpp/tech-translation/milestones{/number}","notifications_url":"https://api.github.com/repos/luxjpp/tech-translation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/luxjpp/tech-translation/labels{/name}","releases_url":"https://api.github.com/repos/luxjpp/tech-translation/releases{/id}","deployments_url":"https://api.github.com/repos/luxjpp/tech-translation/deployments","created_at":"2017-06-22T07:40:11Z","updated_at":"2017-06-21T02:25:13Z","pushed_at":"2017-06-27T06:14:28Z","git_url":"git://github.com/luxjpp/tech-translation.git","ssh_url":"git@github.com:luxjpp/tech-translation.git","clone_url":"https://github.com/luxjpp/tech-translation.git","svn_url":"https://github.com/luxjpp/tech-translation","homepage":null,"size":1072,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"veizz:master","ref":"master","sha":"8d525659ba03f4841294ad94890193b01021c2d1","user":{"login":"veizz","id":1176926,"avatar_url":"https://avatars0.githubusercontent.com/u/1176926?v=3","gravatar_id":"","url":"https://api.github.com/users/veizz","html_url":"https://github.com/veizz","followers_url":"https://api.github.com/users/veizz/followers","following_url":"https://api.github.com/users/veizz/following{/other_user}","gists_url":"https://api.github.com/users/veizz/gists{/gist_id}","starred_url":"https://api.github.com/users/veizz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/veizz/subscriptions","organizations_url":"https://api.github.com/users/veizz/orgs","repos_url":"https://api.github.com/users/veizz/repos","events_url":"https://api.github.com/users/veizz/events{/privacy}","received_events_url":"https://api.github.com/users/veizz/received_events","type":"User","site_admin":false},"repo":{"id":95521146,"name":"tech-translation","full_name":"veizz/tech-translation","owner":{"login":"veizz","id":1176926,"avatar_url":"https://avatars0.githubusercontent.com/u/1176926?v=3","gravatar_id":"","url":"https://api.github.com/users/veizz","html_url":"https://github.com/veizz","followers_url":"https://api.github.com/users/veizz/followers","following_url":"https://api.github.com/users/veizz/following{/other_user}","gists_url":"https://api.github.com/users/veizz/gists{/gist_id}","starred_url":"https://api.github.com/users/veizz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/veizz/subscriptions","organizations_url":"https://api.github.com/users/veizz/orgs","repos_url":"https://api.github.com/users/veizz/repos","events_url":"https://api.github.com/users/veizz/events{/privacy}","received_events_url":"https://api.github.com/users/veizz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/veizz/tech-translation","description":"技术类文章翻译","fork":true,"url":"https://api.github.com/repos/veizz/tech-translation","forks_url":"https://api.github.com/repos/veizz/tech-translation/forks","keys_url":"https://api.github.com/repos/veizz/tech-translation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/veizz/tech-translation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/veizz/tech-translation/teams","hooks_url":"https://api.github.com/repos/veizz/tech-translation/hooks","issue_events_url":"https://api.github.com/repos/veizz/tech-translation/issues/events{/number}","events_url":"https://api.github.com/repos/veizz/tech-translation/events","assignees_url":"https://api.github.com/repos/veizz/tech-translation/assignees{/user}","branches_url":"https://api.github.com/repos/veizz/tech-translation/branches{/branch}","tags_url":"https://api.github.com/repos/veizz/tech-translation/tags","blobs_url":"https://api.github.com/repos/veizz/tech-translation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/veizz/tech-translation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/veizz/tech-translation/git/refs{/sha}","trees_url":"https://api.github.com/repos/veizz/tech-translation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/veizz/tech-translation/statuses/{sha}","languages_url":"https://api.github.com/repos/veizz/tech-translation/languages","stargazers_url":"https://api.github.com/repos/veizz/tech-translation/stargazers","contributors_url":"https://api.github.com/repos/veizz/tech-translation/contributors","subscribers_url":"https://api.github.com/repos/veizz/tech-translation/subscribers","subscription_url":"https://api.github.com/repos/veizz/tech-translation/subscription","commits_url":"https://api.github.com/repos/veizz/tech-translation/commits{/sha}","git_commits_url":"https://api.github.com/repos/veizz/tech-translation/git/commits{/sha}","comments_url":"https://api.github.com/repos/veizz/tech-translation/comments{/number}","issue_comment_url":"https://api.github.com/repos/veizz/tech-translation/issues/comments{/number}","contents_url":"https://api.github.com/repos/veizz/tech-translation/contents/{+path}","compare_url":"https://api.github.com/repos/veizz/tech-translation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/veizz/tech-translation/merges","archive_url":"https://api.github.com/repos/veizz/tech-translation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/veizz/tech-translation/downloads","issues_url":"https://api.github.com/repos/veizz/tech-translation/issues{/number}","pulls_url":"https://api.github.com/repos/veizz/tech-translation/pulls{/number}","milestones_url":"https://api.github.com/repos/veizz/tech-translation/milestones{/number}","notifications_url":"https://api.github.com/repos/veizz/tech-translation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/veizz/tech-translation/labels{/name}","releases_url":"https://api.github.com/repos/veizz/tech-translation/releases{/id}","deployments_url":"https://api.github.com/repos/veizz/tech-translation/deployments","created_at":"2017-06-27T05:33:52Z","updated_at":"2017-06-21T02:25:13Z","pushed_at":"2017-06-27T06:38:59Z","git_url":"git://github.com/veizz/tech-translation.git","ssh_url":"git@github.com:veizz/tech-translation.git","clone_url":"https://github.com/veizz/tech-translation.git","svn_url":"https://github.com/veizz/tech-translation","homepage":null,"size":1064,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/veizz/tech-translation/pulls/1"},"html":{"href":"https://github.com/veizz/tech-translation/pull/1"},"issue":{"href":"https://api.github.com/repos/veizz/tech-translation/issues/1"},"comments":{"href":"https://api.github.com/repos/veizz/tech-translation/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/veizz/tech-translation/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/veizz/tech-translation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/veizz/tech-translation/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/veizz/tech-translation/statuses/1c77dfa8fc9f710304f5dbef6369825c9ffb573f"}}}}
{"actor":{"display_login":"veizz"}}