Debian Codegraph @

js/src/tests/test262/language/import/import-attributes/json-named-bindings.js

raw
1 // |reftest| shell-option(--enable-import-attributes) skip-if(!xulRuntime.shell) error:SyntaxError module -- requires shell-options
2 // Copyright (C) 2021 the V8 project authors. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 esid: sec-parse-json-module
6 description: Does not define named bindings
7 info: |
8 In the early design of JSON modules, contributors considered allowing the
9 properties of object values in JSON modules to be imported directly by name.
10 This was ultimately rejected, so attempting to import in this way should
11 produce a SyntaxError.
12 flags: [module]
13 features: [import-attributes, json-modules]
14 negative:
15 phase: resolution
16 type: SyntaxError
17 ---*/
18
19 $DONOTEVALUATE();
20
21 import {name} from './json-named-bindings_FIXTURE.json' with { type: 'json' };