diff --git a/types/vis/index.d.ts b/types/vis/index.d.ts index 1a967d65c6..b55adc6ac8 100644 --- a/types/vis/index.d.ts +++ b/types/vis/index.d.ts @@ -1715,19 +1715,19 @@ export interface Locales { } export interface LocaleMessages { - edit?: string; - del?: string; - back?: string; - addNode?: string; - addEdge?: string; - editNode?: string; - editEdge?: string; - addDescription?: string; - edgeDescription?: string; - editEdgeDescription?: string; - createEdgeError?: string; - deleteClusterError?: string; - editClusterError?: string; + edit: string; + del: string; + back: string; + addNode: string; + addEdge: string; + editNode: string; + editEdge: string; + addDescription: string; + edgeDescription: string; + editEdgeDescription: string; + createEdgeError: string; + deleteClusterError: string; + editClusterError: string; } export interface Options { diff --git a/types/vis/vis-tests.ts b/types/vis/vis-tests.ts index a4e9d1d6f8..263baffc79 100644 --- a/types/vis/vis-tests.ts +++ b/types/vis/vis-tests.ts @@ -194,7 +194,7 @@ network.setOptions(options2); // // Test code sample from http://visjs.org/docs/network/#locales // -var locales = { +const locales = { en: { edit: 'Edit', del: 'Delete selected', @@ -210,10 +210,10 @@ var locales = { deleteClusterError: 'Clusters cannot be deleted.', editClusterError: 'Clusters cannot be edited.' } -} +}; options = { locale: 'en', - locales: locales, -} + locales, +}; network.setOptions(options);