Socket
Socket
Sign inDemoInstall

mb-ace-typescript

Package Overview
Dependencies
5
Maintainers
1
Versions
322
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mb-ace-typescript

no description


Version published
Weekly downloads
601
increased by1402.5%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Typescript mongodb for ACE

  • Typescript completer for ACE editor, 实现了Method Auto Completer, Parameter Auto Completr, Quick Info, Type Definition(CTRL+mouse hover)
  • Mongo Completer for ACE Editor, 实现了 Mongo Modifier Completor 及 Collection Field Completer.

安装及依赖 (使用)

  • $ npm install

安装及依赖 (开发)

  • $ git clone git://github.com/noteon/typescript-tools.git
  • $ npm install -g electron bower typescript
  • $ bower install
  • $ npm install --production //npm i will trigger npm prepublish, it's a bug

编译

  • $ tsc

运行 demo

  • $ npm start

如何使用

    var aceTs=require("ace-typescript-mongo");

    var tsEditor=aceTs.setupAceEditor({
        tsFilePath:"/tmp/guid.ts",
        tsTypings:[__dirname+"/lodash.d.ts"],
        editorTheme:"monokai",
        editorElem:'ts-editor',
        dbFieldsFetcher: function (collectionName){
          return [{
                      fieldName: '_id',
                      collection: "order",
                  },
                  {    
                      fieldName: 'amount',
                      collection: "order",
                  },
  
                  {
                      fieldName: 'user.fname',
                      collection: "order",
                  },
                  
                  {
                      fieldName: 'user.lname',
                      collection: "order",
                  },
                  
                  {
                      fieldName: 'fname',
                      collection: "user",
                  },
                  
                  {
                      fieldName: 'lname',
                      collection: "user",
                  }
                  
                  ].filter(function(it){
                    if (!collectionName) return true
                    return collectionName===it.collection
                  })
  
      }
    });
    

参见 ./bin/ace.html

Keywords

FAQs

Last updated on 30 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc