Skip to content

Commit

Permalink
Move function from a header to a .cpp file
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner committed Jan 13, 2024
1 parent 9b32516 commit 01453be
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
10 changes: 10 additions & 0 deletions src/bun.js/modules/NodeTTYModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,14 @@ JSC_DEFINE_HOST_FUNCTION(jsFunctionTty_isatty, (JSGlobalObject * globalObject,
return JSValue::encode(jsBoolean(isTTY));
}

JSC_DEFINE_HOST_FUNCTION(jsFunctionNotImplementedYet,
(JSGlobalObject * globalObject,
CallFrame *callFrame)) {
VM &vm = globalObject->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
throwException(globalObject, throwScope,
createError(globalObject, "Not implemented yet"_s));
return JSValue::encode(jsUndefined());
}

} // namespace Zig
11 changes: 1 addition & 10 deletions src/bun.js/modules/NodeTTYModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,7 @@ namespace Zig {
using namespace WebCore;

JSC_DECLARE_HOST_FUNCTION(jsFunctionTty_isatty);

JSC_DEFINE_HOST_FUNCTION(jsFunctionNotImplementedYet,
(JSGlobalObject * globalObject,
CallFrame *callFrame)) {
VM &vm = globalObject->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
throwException(globalObject, throwScope,
createError(globalObject, "Not implemented yet"_s));
return JSValue::encode(jsUndefined());
}
JSC_DECLARE_HOST_FUNCTION(jsFunctionNotImplementedYet);

DEFINE_NATIVE_MODULE(NodeTTY) {
INIT_NATIVE_MODULE(3);
Expand Down

0 comments on commit 01453be

Please sign in to comment.