angular-fullstack/generator-angular-fullstack

[HELP WANTED] Add types for TS/Flow

开放

#1,812 创建于 2016年4月21日

 (1 条评论) (0 个反应) (1 位负责人)JavaScript (1,268 个派生)batch import
Help Wantedmajor

仓库指标

星标
 (6,134 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Add type annotations for TypeScript & Flow.

As of 3.7.0-beta.1, the generator runs template files through EJS, then Babel, and then a beutifier before writing them to your scaffold directory. This means that now we can include things like type definitions, and have an option to include them or not. You can see the first type annotation I added here: auth.service.js#L23.

It would be a fairly large undertaking to manually add type annotations to every file in the whole project, so I'm looking to the community for help. Here's what to do if you'd like to help:

  • branch off of the canary branch
  • templates are located in the templates folder.
  • it would be easiest if type definitions submitted work with both TypeScript and Flow
  • you can include TS/Flow specific code by using EJS (use filters.ts and filters.flow)
<%_ if(filters.ts) { _%>
interface thing {
  func(value: any): string;
}<% } %>

Comment here if you'd like to help out.

贡献者指南