ocket8888 commented on a change in pull request #6005:
URL: https://github.com/apache/trafficcontrol/pull/6005#discussion_r666537435



##########
File path: 
traffic_portal/app/src/common/modules/table/agGrid/CommonGridController.d.ts
##########
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+export namespace CGC {
+    export enum OptionType {
+        Seperator = 0,
+        Button = 1,
+        Ancor = 2
+    }
+
+    export interface GridSettings {
+        rowClassRules?: any;
+        selectRows?: boolean;
+        selectionProperty?: string;
+        refreshable?: boolean;
+
+        onRowClick(row: any): void;
+    }
+
+    export interface CommonOption {
+        type: OptionType;
+        name: string;
+        newTab: boolean;
+
+        onClick(row: any): void;
+        isDisabled(row: any): boolean;
+        shown(row: any): void;
+
+        // If href is undefined, getHref is called
+        href: string;
+        getHref(row: any): string;
+
+        // If text is undefined, getText is called
+        text: string;
+        getText(row: any): string;
+    }
+
+    export interface TitleButton {
+        onClick(): void;
+        getText(): string;
+    }
+
+    export interface DropDownOption extends CommonOption {
+    }
+
+    export interface ContextMenuOption extends CommonOption{
+    }
+
+}

Review comment:
       Shouldn't you just be able to import the AG-grid typings in this file? 
They're included in the package, which is already a dependency.




-- 
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]


Reply via email to