Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F100675623
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, 18:53
Size
294 B
Mime Type
text/x-java
Expires
Mon, Feb 3, 18:53 (1 d, 21 h)
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