Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97371

Is there any option to change auto-implementation TypeScript language in VSCode?

$
0
0

I'm woring with VSCode and TypeScript and using many interfaces that refer to eachother. So the VSCode's Implement interface hotfix function is very useful, but the end result is not perfect.

Here is what I get now:

import { CertificationOutgoingInvoiceUIFieldsInterface } from './certification-outgoing-invoice.interface';

export class CertificationOutgoingInvoice implements CertificationOutgoingInvoiceUIFieldsInterface {
  deviza_id: import("../../../base-model/base-data-type.model").ID;
  deviza_exchange_type_id: import("../../../base-model/base-data-type.model").ID;
  payment_type_id: import("../../../base-model/base-data-type.model").ID;
  foreign_invoice_id: string;
  foreign_api_status: import("../../../base-model/base-data-type.model").ForeignAPIStatus;
  foreign_api_messages: string[];
  is_installment_enabled: boolean;
  installments: import("../../../invoice/installment/invoice-installment.interface").InvoiceInstallmentInterface[];
  files: import("../../../file/file-model.interface").FileModelInterface[];
}

Actually two problems are here.

  1. I set it up earlier in tslint to use apostrophe instead of double quotes. It's working fine if I use the Ctrl + space combination to include an import line.

  2. This end result would be much more handy:

import { CertificationOutgoingInvoiceUIFieldsInterface } from './certification-outgoing-invoice.interface';
import { ID, ForeignAPIStatus } from 'src/app/models/base-model/base-data-type.model';
import { InvoiceInstallmentInterface } from 'src/app/models/invoice/installment/invoice-installment.interface';
import { FileModelInterface } from 'src/app/models/file/file-model.interface';

export class CertificationOutgoingInvoice implements CertificationOutgoingInvoiceUIFieldsInterface {
  deviza_id: ID;
  deviza_exchange_type_id: ID;
  payment_type_id: ID;
  foreign_invoice_id: string;
  foreign_api_status: ForeignAPIStatus;
  foreign_api_messages: string[];
  is_installment_enabled: boolean;
  installments: InvoiceInstallmentInterface[];
  files: FileModelInterface[];
}

This is much more cleaner. Now I need to spend time to fix the auto-implement's result to this.

Is there any option to get this end result in VSCode?


Viewing all articles
Browse latest Browse all 97371

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>