Skip to content

Commit 1394deb

Browse files
committed
Fixes samples
1 parent 0e4a7a5 commit 1394deb

File tree

2 files changed

+5
-5
lines changed
  • website/src/website/data/playground-samples/extending-language-services

2 files changed

+5
-5
lines changed

website/src/website/data/playground-samples/extending-language-services/configure-javascript-defaults/sample.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
// to the system and how the compiler is told to use ES6 (target=2).
55

66
// validation settings
7-
monaco.languages.typescript.javascriptDefaults.setDiagnosticsOptions({
7+
monaco.typescript.javascriptDefaults.setDiagnosticsOptions({
88
noSemanticValidation: true,
99
noSyntaxValidation: false,
1010
});
1111

1212
// compiler options
13-
monaco.languages.typescript.javascriptDefaults.setCompilerOptions({
14-
target: monaco.languages.typescript.ScriptTarget.ES2015,
13+
monaco.typescript.javascriptDefaults.setCompilerOptions({
14+
target: monaco.typescript.ScriptTarget.ES2015,
1515
allowNonTsExtensions: true,
1616
});
1717

@@ -25,7 +25,7 @@ var libSource = [
2525
"}",
2626
].join("\n");
2727
var libUri = "ts:filename/facts.d.ts";
28-
monaco.languages.typescript.javascriptDefaults.addExtraLib(libSource, libUri);
28+
monaco.typescript.javascriptDefaults.addExtraLib(libSource, libUri);
2929
// When resolving definitions and references, the editor will try to use created models.
3030
// Creating a model for the library allows "peek definition/references" commands to work with the library.
3131
monaco.editor.createModel(libSource, "typescript", monaco.Uri.parse(libUri));

website/src/website/data/playground-samples/extending-language-services/configure-json-defaults/sample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var modelUri = monaco.Uri.parse("a://b/foo.json"); // a made up unique URI for o
55
var model = monaco.editor.createModel(jsonCode, "json", modelUri);
66

77
// configure the JSON language support with schemas and schema associations
8-
monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
8+
monaco.json.jsonDefaults.setDiagnosticsOptions({
99
validate: true,
1010
schemas: [
1111
{

0 commit comments

Comments
 (0)