You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
A standardized JSON Schema representation that preserves inferred type information Standard JSON Schema is a common interface designed to be implemented by JavaScript and TypeScript entities that are or can be converted to JSON Schema. The goal is to make it easier for ecosystem tools to accept user-defined types (typically defined using schema/validation libraries) without needing to write custom
// RUNTIME VALIDATORS export function is<T>(input: unknown): input is T; // returns boolean export function assert<T>(input: unknown): T; // throws TypeGuardError export function assertGuard<T>(input: unknown): asserts input is T; export function validate<T>(input: unknown): IValidation<T>; // detailed // JSON FUNCTIONS export namespace json { export function schema<T>(): IJsonSchemaUnit<T>; // JS
JSON-LD TypeScript types for Schema.org vocabulary. schema-dts provides TypeScript definitions for Schema.org vocabulary in JSON-LD format. The typings are exposed as complete sets of discriminated type unions, allowing for easy completions and stricter validation. This repository contains two NPM packages: schema-dts-gen Providing a command-line tool to generate TypeScript files based on a specif
package com.example; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import java.time.OffsetDateTime; @JsonSerialize public class User { @JsonProperty("createdAt") private OffsetDateTime createdAt; @JsonProperty("id") private String id; @JsonProperty("isAdmin") private Boolean isAdmin; @JsonProperty("karma") private Integer karm
We're under construction. Please check back for an update soon.
Sat, Mar 19, 2016 EDITS: Calling toString on Date is for illustrative purposes. There’s a full commented example at the end. Use toJSON method as suggested by Schipperz. Add reviver method as suggested by Anders Ringqvist. So you have a User type in your code. At some point you’re going to want to encode this as JSON. This works as you’d expect. > JSON.stringify({ name: "bob", age: 34, created: ne
はじめに プログラマーなら誰しも、YAML や JSON、XML、Excel ファイル、あるいは独自の DSL などで書いた定義ファイルからコードを自動生成するツールを使用した経験があると思います。 でも、JSON、XML を手で書いていくのはつらい。独自 DSL は覚えるのがつらい。YAML も凝ったことやろうとするとカスタムタグとかいろいろ用意したりしないといけなくて、独自 DSL 化してつらい。Excel ファイルは…… ということで、みんな大好き TypeScript の表現力豊かな記法でそういった定義ファイルが書けて、コードを自動生成できたら幸せなんじゃないだろうかと思い、年末あたりに時間をかけて typhen というツールを作ってみました。 今回はそのご紹介です。 使い方 たとえば、typings/definitions.d.ts に下記のようなインターフェイスがあって、そこか
$ npm install -g $ dts-parser examples/dummy.d.ts nodeType: TopModule moduleName: Top modules: - nodeType: Module moduleName: Foo modules: (empty array) classes: - nodeType: ClassNode className: Bar properties: - nodeType: VariableNode propertyName: x typeAnnotation: nodeType: AnnotatedType typeName: Any typeArguments: (empty array) isArray: false typeParameters: null heritages: implementList: nul
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く