@@ -11,7 +11,7 @@ PropertyDescriptor::Accessor(const char* utf8name,
1111 Getter getter,
1212 napi_property_attributes attributes,
1313 void * /* data*/ ) {
14- typedef details::CallbackData<Getter, Napi::Value> CbData ;
14+ using CbData = details::CallbackData<Getter, Napi::Value>;
1515 // TODO: Delete when the function is destroyed
1616 auto callbackData = new CbData ({ getter, nullptr });
1717
@@ -40,7 +40,7 @@ inline PropertyDescriptor PropertyDescriptor::Accessor(napi_value name,
4040 Getter getter,
4141 napi_property_attributes attributes,
4242 void * /* data*/ ) {
43- typedef details::CallbackData<Getter, Napi::Value> CbData ;
43+ using CbData = details::CallbackData<Getter, Napi::Value>;
4444 // TODO: Delete when the function is destroyed
4545 auto callbackData = new CbData ({ getter, nullptr });
4646
@@ -71,7 +71,7 @@ inline PropertyDescriptor PropertyDescriptor::Accessor(const char* utf8name,
7171 Setter setter,
7272 napi_property_attributes attributes,
7373 void * /* data*/ ) {
74- typedef details::AccessorCallbackData<Getter, Setter> CbData ;
74+ using CbData = details::AccessorCallbackData<Getter, Setter>;
7575 // TODO: Delete when the function is destroyed
7676 auto callbackData = new CbData ({ getter, setter, nullptr });
7777
@@ -102,7 +102,7 @@ inline PropertyDescriptor PropertyDescriptor::Accessor(napi_value name,
102102 Setter setter,
103103 napi_property_attributes attributes,
104104 void * /* data*/ ) {
105- typedef details::AccessorCallbackData<Getter, Setter> CbData ;
105+ using CbData = details::AccessorCallbackData<Getter, Setter>;
106106 // TODO: Delete when the function is destroyed
107107 auto callbackData = new CbData ({ getter, setter, nullptr });
108108
@@ -133,8 +133,8 @@ inline PropertyDescriptor PropertyDescriptor::Function(const char* utf8name,
133133 Callable cb,
134134 napi_property_attributes attributes,
135135 void * /* data*/ ) {
136- typedef decltype (cb (CallbackInfo (nullptr , nullptr ))) ReturnType ;
137- typedef details::CallbackData<Callable, ReturnType> CbData ;
136+ using ReturnType = decltype (cb (CallbackInfo (nullptr , nullptr )));
137+ using CbData = details::CallbackData<Callable, ReturnType>;
138138 // TODO: Delete when the function is destroyed
139139 auto callbackData = new CbData ({ cb, nullptr });
140140
@@ -163,8 +163,8 @@ inline PropertyDescriptor PropertyDescriptor::Function(napi_value name,
163163 Callable cb,
164164 napi_property_attributes attributes,
165165 void * /* data*/ ) {
166- typedef decltype (cb (CallbackInfo (nullptr , nullptr ))) ReturnType ;
167- typedef details::CallbackData<Callable, ReturnType> CbData ;
166+ using ReturnType = decltype (cb (CallbackInfo (nullptr , nullptr )));
167+ using CbData = details::CallbackData<Callable, ReturnType>;
168168 // TODO: Delete when the function is destroyed
169169 auto callbackData = new CbData ({ cb, nullptr });
170170
0 commit comments