OpenLayers和TypeScript? [英] OpenLayers and TypeScript?

查看:296
本文介绍了OpenLayers和TypeScript?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有人知道OpenLayers是否有任何现有的TypeScript定义文件(或者是否已经在制作中).

I was wondering if anybody knows if there are any existing TypeScript definition files for OpenLayers (or if they are already in the making).

我尝试自己解析OpenLayers源文件,并使用文档注释来构建TypeScript定义文件,但要真正完成这项工作,我需要一个完整的JavaScript解析器,该解析器还要了解OpenLayers中的文档语法(它使用NaturalDocs, http://naturaldocs.org ),并且我开始认为手动翻译信息比编写这样的解析器要容易得多:(.

I tried parsing the OpenLayers source files myself and use the documentation comments to build a TypeScript definition file but to really make this work I would need a complete JavaScript parser that also understand the documentation syntax in OpenLayers (it uses NaturalDocs, http://naturaldocs.org) and I'm beginning to think that translating the info by hand is easier than writing such a parser :(.

那么现在有一个类似项目的人还是有一个想法如何完成生成那些TypeScript定义文件的任务?

So does anybody now of a similar project or has an idea how to accomplish the task of generating those TypeScript definition files?

提前谢谢!

推荐答案

今天,我已经将OL 3.1.1的定义上传到了Github: https://github.com/3x0dv5/ol3-typescript-definitions 随时使用

Today I have uploaded the definitions for OL 3.1.1 to Github: https://github.com/3x0dv5/ol3-typescript-definitions Feel free to use

这篇关于OpenLayers和TypeScript?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆