Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F100619762
checkConst.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Feb 1, 05:47
Size
294 B
Mime Type
text/x-java
Expires
Mon, Feb 3, 05:47 (2 d)
Engine
blob
Format
Raw Data
Handle
24001565
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
checkConst.js
View Options
import
CompileError
from
'./CompileError.js'
;
export
default
function
checkConst
(
identifier
,
scope
)
{
const
declaration
=
scope
.
findDeclaration
(
identifier
.
name
);
if
(
declaration
&&
declaration
.
kind
===
'const'
)
{
throw
new
CompileError
(
`
$
{
identifier
.
name
}
is
read
-
only
`
,
identifier
);
}
}
Event Timeline
Log In to Comment