LoginSignup
1
0

More than 5 years have passed since last update.

JSX completionのspec

Last updated at Posted at 2012-09-05

draft。jsx --complete で返すものは CompleteCandidate[] を JSON serializeしたもの。これをエディタが受け取り、補完候補を作る。

class CompleteCandidate {
    var word : string;                    // 補完対象ワード
    var partialWord : string              // 補完対象ワードの一部(*)
    var doc : Nullable.<string>;          // jsxdocによる説明文
    var type : Nullable.<string>;         // 型
    var declare : Nullable.<string>;      // 完全な宣言文
    var definedClass : Nullable.<string>; // 補完候補が定義されているクラス
    var definedFile : Nullable.<string>;  // 定義されたファイル
    var definedLine : Nullable.<int>;     // 定義された行
}

(*) partialWord: "JSON.st" に対して "ringify" を補完対象とする

例:

{
    "word" : "stringify",
    "partialWord" : "ringify",
    "doc" : "serialize any type of object as JSON string",
    "type" : "function (value : variant) : string",
    "declare" : "static function stringify (value : variant) : string",
    "definedClass" : "JSON",
    "definedFile" : "lib/built-in/jsx",
    "definedLine" : 903
}
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0