1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

added tsconfig/useDefineForClassFields:true as part of mobx6 migration guide step

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman 2021-04-28 14:26:24 +03:00
parent 5a35d2a032
commit 0190fd33d4
12 changed files with 12 additions and 27 deletions

View File

@ -43,22 +43,6 @@ export class CronJob extends KubeObject {
static namespaced = true; static namespaced = true;
static apiBase = "/apis/batch/v1beta1/cronjobs"; static apiBase = "/apis/batch/v1beta1/cronjobs";
kind: string;
apiVersion: string;
metadata: {
name: string;
namespace: string;
selfLink: string;
uid: string;
resourceVersion: string;
creationTimestamp: string;
labels: {
[key: string]: string;
};
annotations: {
[key: string]: string;
};
};
spec: { spec: {
schedule: string; schedule: string;
concurrencyPolicy: string; concurrencyPolicy: string;

View File

@ -10,7 +10,7 @@ export class DaemonSet extends WorkloadKubeObject {
static namespaced = true; static namespaced = true;
static apiBase = "/apis/apps/v1/daemonsets"; static apiBase = "/apis/apps/v1/daemonsets";
spec: { declare spec: {
selector: { selector: {
matchLabels: { matchLabels: {
[name: string]: string; [name: string]: string;

View File

@ -72,7 +72,7 @@ export class Deployment extends WorkloadKubeObject {
static namespaced = true; static namespaced = true;
static apiBase = "/apis/apps/v1/deployments"; static apiBase = "/apis/apps/v1/deployments";
spec: { declare spec: {
replicas: number; replicas: number;
selector: { matchLabels: { [app: string]: string } }; selector: { matchLabels: { [app: string]: string } };
template: { template: {

View File

@ -11,7 +11,7 @@ export class Job extends WorkloadKubeObject {
static namespaced = true; static namespaced = true;
static apiBase = "/apis/batch/v1/jobs"; static apiBase = "/apis/batch/v1/jobs";
spec: { declare spec: {
parallelism?: number; parallelism?: number;
completions?: number; completions?: number;
backoffLimit?: number; backoffLimit?: number;

View File

@ -187,7 +187,7 @@ export class Pod extends WorkloadKubeObject {
static namespaced = true; static namespaced = true;
static apiBase = "/api/v1/pods"; static apiBase = "/api/v1/pods";
spec: { declare spec: {
volumes?: { volumes?: {
name: string; name: string;
persistentVolumeClaim: { persistentVolumeClaim: {

View File

@ -32,7 +32,8 @@ export class ReplicaSet extends WorkloadKubeObject {
static kind = "ReplicaSet"; static kind = "ReplicaSet";
static namespaced = true; static namespaced = true;
static apiBase = "/apis/apps/v1/replicasets"; static apiBase = "/apis/apps/v1/replicasets";
spec: {
declare spec: {
replicas?: number; replicas?: number;
selector: { matchLabels: { [app: string]: string } }; selector: { matchLabels: { [app: string]: string } };
template?: { template?: {

View File

@ -46,7 +46,7 @@ export class Service extends KubeObject {
externalIPs?: string[]; // https://kubernetes.io/docs/concepts/services-networking/service/#external-ips externalIPs?: string[]; // https://kubernetes.io/docs/concepts/services-networking/service/#external-ips
}; };
status: { declare status: {
loadBalancer?: { loadBalancer?: {
ingress?: { ingress?: {
ip?: string; ip?: string;

View File

@ -33,7 +33,7 @@ export class StatefulSet extends WorkloadKubeObject {
static namespaced = true; static namespaced = true;
static apiBase = "/apis/apps/v1/statefulsets"; static apiBase = "/apis/apps/v1/statefulsets";
spec: { declare spec: {
serviceName: string; serviceName: string;
replicas: number; replicas: number;
selector: { selector: {
@ -86,7 +86,7 @@ export class StatefulSet extends WorkloadKubeObject {
}; };
}[]; }[];
}; };
status: { declare status: {
observedGeneration: number; observedGeneration: number;
replicas: number; replicas: number;
currentReplicas: number; currentReplicas: number;

View File

@ -144,7 +144,6 @@ export class KubeObject implements ItemObject {
apiVersion: string; apiVersion: string;
kind: string; kind: string;
metadata: IKubeObjectMetadata; metadata: IKubeObjectMetadata;
status?: any; // todo: type-safety support
get selfLink() { get selfLink() {
return this.metadata.selfLink; return this.metadata.selfLink;

View File

@ -324,7 +324,7 @@ export class MenuItem extends React.Component<MenuItemProps> {
static defaultProps = defaultPropsMenuItem as object; static defaultProps = defaultPropsMenuItem as object;
static contextType = MenuContext; static contextType = MenuContext;
public context: MenuContextValue; declare context: MenuContextValue;
public elem: HTMLElement; public elem: HTMLElement;
get isFocusable() { get isFocusable() {

View File

@ -62,7 +62,7 @@ export interface TabProps<D = any> extends DOMAttributes<HTMLElement> {
export class Tab extends React.PureComponent<TabProps> { export class Tab extends React.PureComponent<TabProps> {
static contextType = TabsContext; static contextType = TabsContext;
public context: TabsContextValue; declare context: TabsContextValue;
public elem: HTMLElement; public elem: HTMLElement;
get isActive() { get isActive() {

View File

@ -23,6 +23,7 @@
"allowSyntheticDefaultImports": true, "allowSyntheticDefaultImports": true,
"traceResolution": false, "traceResolution": false,
"resolveJsonModule": true, "resolveJsonModule": true,
"useDefineForClassFields": true,
"paths": { "paths": {
"*": [ "*": [
"node_modules/*", "node_modules/*",