http_response_code
редиректа (30х).setTimeout
вместо функции, использовано document.location
вместо window.location
.<form>
<input />
<button onclick="alert('Такие дела')"></button>
</form>
<div class="row">
<div class="input-field col s12">
<select class="group-select" ref="select2" v-model="depart_select">
<optgroup v-for="department in departments" :key="department.id" :label="department.NameOtdel">
<option v-for="{NamePodrazdel, id} in department.NamePodrazdel" :key="id" :value="id">{{ NamePodrazdel }} </option>
</optgroup>
</select>
<label>Структурное подразделение</label>
</div>
</div>
anotherReplace: [/\(\.\*\)$/, ':name']
function strReplace = (str, anotherReplace = null) => {
str = str
.replace(что-то заменяем)
.replace(eщё что меняем);
if (anotherReplace)
str = str.replace(anotherReplace[0], anotherReplace[1]);
return str;
}
interface Volume {
id: number;
volume?: string;
}
interface Snapshot {
id: number;
snapshot?: string;
}
А так нет:interface Volume {
id: number;
volume: string;
}
interface Snapshot {
id: number;
snapshot: string;
}
interface Volume {
id?: number;
}
interface Snapshot {
id?: string;
}
enum Constants {
VERTICAL = 'vertical',
STEP = 'step'
}
interface ConstantsTypes {
[Constants.VERTICAL]: boolean,
[Constants.STEP]: number,
}
public get<T extends keyof ConstantsTypes>(prop: T): ConstantsTypes[T] {}
export class IResultItem {
constructor(
public id: i32,
public type: string,
public date: string,
public from: string,
public from_id: i32,
public text: string
) {}
}
export function add(
result: IResultItem[] = [new IResultItem( 1, "type", "25.25.2025", "rew", 123, "hello" )]
): IResultItem[] {
return result;
}
export default {
server: {
host: '0.0.0.0'
}
}
function makeUser() {
return {
name: "Джон",
get ref(){
return this
}
};
};
let user = makeUser();
console.log(user.ref);