The exact structure of a subject depends on the subject type. The available subject types are kana_vocabulary, kanji, radical, and vocabulary. Note that any attributes called out for the specific subject type behaves differently than the common attribute of the same name.

This type asserts the subject type is a vocabulary subject, and provides better type assertions requiring less type checking in code.

interface WKVocabulary {
    data: WKVocabularyData;
    data_updated_at: WKDatableString;
    id: number;
    object: "vocabulary";
    url: string;
    code?: undefined;
    error?: undefined;
}

Hierarchy (view full)

Properties

Data for the returned vocabulary.

data_updated_at: WKDatableString

For a resource, this is the last time that particular resource was updated.

id: number

A unique number identifying the vocabulary.

object: "vocabulary"

The kind of object returned.

url: string

The URL of the requested resource.

code?: undefined

A resource will never have a code property.

error?: undefined

A resource will never have an error property.