jgoz commented on code in PR #16359:
URL: https://github.com/apache/druid/pull/16359#discussion_r1585200864


##########
web-console/src/ace-modes/dsql.ts:
##########
@@ -21,36 +21,42 @@
 // Originally licensed under the MIT license 
(https://github.com/thlorenz/brace/blob/master/LICENSE)
 // This file was modified to make the list of keywords more closely adhere to 
what is found in DruidSQL
 
-var druidKeywords = require('../../lib/keywords');
-var druidFunctions = require('../../lib/sql-docs');
+import type { Ace } from 'ace-builds';
+import ace from 'ace-builds/src-noconflict/ace';
+
+import druidKeywords from '../../lib/keywords';
+import druidFunctions from '../../lib/sql-docs';
+
+import type { ItemDescription } from './make-doc-html';
+import { makeDocHtml } from './make-doc-html';
 
 ace.define(
   'ace/mode/dsql_highlight_rules',
   ['require', 'exports', 'module', 'ace/lib/oop', 
'ace/mode/text_highlight_rules'],
-  function (acequire, exports, module) {
+  function (acequire: any, exports: any) {
     'use strict';
 
-    var oop = acequire('../lib/oop');
-    var TextHighlightRules = 
acequire('./text_highlight_rules').TextHighlightRules;
+    const oop = acequire('../lib/oop');
+    const TextHighlightRules = 
acequire('./text_highlight_rules').TextHighlightRules;
 
-    var SqlHighlightRules = function () {
+    const SqlHighlightRules = function (this: any) {
       // Stuff like: 
'with|select|from|where|and|or|group|by|order|limit|having|as|case|'
-      var keywords = 
druidKeywords.SQL_KEYWORDS.concat(druidKeywords.SQL_EXPRESSION_PARTS)
+      const keywords = 
druidKeywords.SQL_KEYWORDS.concat(druidKeywords.SQL_EXPRESSION_PARTS)
         .join('|')
         .replace(/\s/g, '|');
 
       // Stuff like: 'true|false'
-      var builtinConstants = druidKeywords.SQL_CONSTANTS.join('|');
+      const builtinConstants = druidKeywords.SQL_CONSTANTS.join('|');
 
       // Stuff like: 'avg|count|first|last|max|min'
-      var builtinFunctions = druidKeywords.SQL_DYNAMICS.concat(
+      const builtinFunctions = druidKeywords.SQL_DYNAMICS.concat(
         Object.keys(druidFunctions.SQL_FUNCTIONS),
       ).join('|');
 
       // Stuff like: 
'int|numeric|decimal|date|varchar|char|bigint|float|double|bit|binary|text|set|timestamp'
-      var dataTypes = Object.keys(druidFunctions.SQL_DATA_TYPES).join('|');
+      const dataTypes = Object.keys(druidFunctions.SQL_DATA_TYPES).join('|');

Review Comment:
   I can't tell if these issues are on `druidFunctions` or on `Object`, but 
they are all wrong.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to