Я бы sh Я мог бы дать более описательный заголовок, но ... это просто странно.
Что бы вы ожидали cl_2
, col_2
и cool_2
свойства будут? То же самое, верно?
r={parStyle: `numbered_${XtoDepth(myfound.Xs)}_para`,
layout: "indent-1",
col_1: incState(myfound.Xs,locationtree[listname],l),
just_the_text: myfound.text,
text_in_an_object: { text: myfound.text },
text_in_an_array: [ myfound.text ],
text_in_both: [ { "text": myfound.text } ],
cl_2: [ { "text": myfound.text } ],
col_2: [ { "text": myfound.text } ],
cool_2: [ { "text": myfound.text } ],
text_should_be_identical_to_col_2: [ { "text": myfound.text } ]
};
console.log(`megapdfelem: attribute cl_2 is:`); console.log(r.cl_2);
console.log(`megapdfelem: attribute col_2 is:`); console.log(r.col_2);
console.log(`megapdfelem: attribute cool_2 is:`); console.log(r.cool_2);
Ну, просто посмотрите на мою JS консоль.
![enter image description here](https://i.stack.imgur.com/gPy7d.png)
Это соответствует Версии узла от 6 до 10.
Определение типа не светится:
var r : { parStyle?:string, layout?:string, col_1?:string, style?: string, cl_2?: Object[], col_2?: Object[], cool_2?: Object[], col_3?: Object[], stack?: Object[], to_xref?:Object } = {}