-
How to test ts files with jest
see the instructions on jest s official website to download ts-jest, but I don t know how to use it, and no clear tutorials have been found. Please help me ...
-
Typescript circular reference problem
there are two classes as follows
Parent.ts
import {Sub} from ". Sub";
export class Parent {
public getSub() {
return new Sub();
}
}
Sub.ts
import {Parent} from ". Parent";
export class Sub extends Parent {}
r...
-
Jsonp cross-domain request, if the website where the resource is located is limited, how to deal with the data that cannot be requested?
data cannot be returned when using a jsonp request. Because the site has made restrictions, you can only request under this domain name to get the data. could you tell me how to solve this problem? or there are other cross-domain methods that can solve...
-
How is Baidu News added to the website?
when our website is opened on the computer side, Baidu news often appears at the bottom of the page. I don t know what this is caused by, is it the code? Did we drive it on our own initiative? Or are there some problems with the settings of the operato...
-
How nestjs validates some parameters.
according to nest.js official documents, request parameter verification is implemented using class-validator and pipe , but can only be fully verified according to the rules defined when the entity is defined, that is, the verification rules in th...
-
Why the vue-shims.d.ts file can be used in typeScipt and how ts recognizes it.
in addition, why the following code can declare a .vue file.
src vue-shims.d.ts
declare module "*.vue" {
import Vue from "vue";
export default Vue;
}
...
-
How the tinyMCE Rich text Editor sets the default picture width
guys, I want to set a default width for the image in the editor after the user uploads the picture. Where should I set it?
here are my current tinyMCE initialization settings
tinymce.init({
selector: -sharp + this.elementId,
...
-
Vue uses $router to jump to the page and pass the parameter question.
I want to use $router.push () to jump to the page to transfer parameters, how should I write. (ps: my project is all imported into Vue files directly with script tags)
I execute the function Path. I want to transfer the data to the sort-add.html page....
-
@ ngrx/core @ ngrx/store-- save reports errors in both angular2 and angular4
npm install @ ngrx core @ ngrx store-- save reports errors in both angular2 and angular4
...
-
How does typescript beautifully define and reference types?
first of all, let s talk about my problem. I m currently building a project using webpack + typescript to define a class: NetData.
requirements are as follows:
there is a frequently used function: (netdata: NetData) = > void . I wrote an alias u...
-
Vue + typeScript eslint error report?
Code first
http: eslint.org docs rules Parsing error: Unexpected token
10 | @Component
11 | export default class HelloWorld extends Vue {
> 12 | private msg: string = Welcome to Your Vue.js App
| ^
13 | ...
-
Rules of TypeScript Code formatting Scheme
recently, I have seen the official coding specification used by TypeScript to constrain contributors. There are several doubts as follows:
Private property names do not use the _ prefix: why not the _ prefix?
Don t add I in front of the interface ...
-
The problem of merging javascript objects
in the following objects:
var prd = {
"id": 1,
"department_id": 42,
"products": [{
"id": 12,
"name": "49da",
"grouped_addons": [{
...
-
It is not perfect to use typescript code to prompt an exception in a .vue file.
the test2 attribute is explicitly declared in my custom class, but when I instantiate the class in the .vue file, the code prompt does not have the attribute test2 (although it will not report an error), but the code prompt is normal after I reload...
-
How to solve the problem that changing the face value of the picture causes the upload button of ng2-file-upload to be invalid?
<select class="input-group-sm form-control">
<option>{{xx}}< option>
< select>
<input -sharpfileSelect type="file" ng2FileSelect [uploader]="uploader" (change)="bb($event)" >
&l...
-
How to customize alert, confirm and other pop-up boxes in ionic3 + angular5 + typescript project
ionic3angular5ionic3alertControllerionic3es6alertconfirm
ionic1+angularjs1+JavaScriptalertconfirmfunctionoptionionic1$popupoptions
...
-
The problem with vue typescript
I would like to ask whether vue2.5 will not need this code in the future
declare module *.vue {
import Vue from vue ;
export default Vue;
}
I ve seen many configuration tutorials require this, but official documents say
in Vue 2.5.0 ...
-
I would like to ask ts how to write d.ts when importing the js file of a single function.
the md5 library is needed in the project, and the front end is not Node,. Because of the project, you can t use npm and then webpack transfer.
The md5 library used by is this https: github.com blueimp Ja..
used in ts
class Md5 {
md5(data:str...
-
Property 'find' does not exist on type' Product []?
import * as express from express
import {Server} from ws
const app = express()
export class Product {
constructor(
public id: number,
public title: string,
public price: number,
public rating: number,
...
-
Whether typescript, is used in the react project also needs to use prop-types for format verification.
for example: whether typescript, is used in the react project also needs to use prop-types for format verification. ...