Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

Recent questions tagged ts

0 votes
1.2k views
1 answer
    My project structure is next (I'm running code with ts-node) project-a tsconfig.json // referencing 'common ... /typescript-does-not-grab-custom-types-from-the-referenced-project...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    createComponent 的定义 使用在这里 问题如下 按照现在的写法,这里的高阶函数 createComponent 没有接受到外部传入的泛型,将使用默认的泛型DefaultProps等,这里如何使得<Props ... 入 Props: { name: string },让createComponent接收到的 Props 类型就是我这里传入的 ...
asked Jan 29, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.3k views
1 answer
    createComponent 的定义 使用在这里 问题如下 按照现在的写法,这里的高阶函数 createComponent 没有接受到外部传入的泛型,将使用默认的泛型DefaultProps等,这里如何使得<Props ... 入 Props: { name: string },让createComponent接收到的 Props 类型就是我这里传入的 ...
asked Jan 29, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    如何修改第三行返回的类型,使 result 拥有 age: number 同时现有的返回的类型也还要在...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    定义处 interface taskStatusListType { value: number label: string } const taskStatusList: taskStatusListType[] = [ { value: 0, label: '进行中' } ... )) .label }, }, 报错截图: 如何写,vscode才不会飘红...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    比如有一个 Form 组件,它需要所有子组件都有 name 字段 <Form> <Input name="username"></Input> <Select name="sex"></Select> // 这里写的时 ... <IProps> = ({ children }) => { return <form>{children}</form> }...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    ts 定义一个num:number 但是 num默认值不想写数字 并且if判断的时候偶默认值还是false 怎么破 写null和undefined都报错...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    │ index.ts │ tsconfig.json └───src app.ts │ index.ts │ index.js │ tsconfig.json └───src app.ts └───lib app.js 希望达到的效果是index入口js/ts文件均在最上层,ts源码在src目录下,编译后的js代码在lib目录下,应该如何配置实现呢...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    var uri = 'data:application/vnd.ms-excel;base64,', template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" ... not exist on type 'HTMLElement'. Did you mean 'onload'?...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    interface person { sex: string; } interface stu { name: string; order?: number; new (p: person): any; } class Test implements ... } export function test()?{ const t = new Test(); }...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.3k views
1 answer
    interface person { sex: string; } interface stu { name: string; order?: number; new (p: person): any; } class Test implements ... } export function test()?{ const t = new Test(); }...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    ...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.6k views
1 answer
    ...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
2.1k views
1 answer
    要去好几个文件中把接口引过来,如果定义在一个文件里面,那这几个文件又要去引入定义的文件, 最完美的就是 每个文件自己管理自己的props,如果引入的话有没有快捷的方式从每个文件里面一次性导入到汇总页...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
3.3k views
1 answer
    如图,index.ts 中只能导入D4 那为什么在 右侧的申明文件中 namespace 变量 函数 前使用 declare 有什么用...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
3.4k views
1 answer
    例如一个函数,接受一个 promise 数组,然后再把这个 promise 数组 return,如何推导出 return 后的 promise 值呢? 例如下面的代码,希望可以推导出 then 中的 res function ... Promise.resolve(1) ]).then(arr => { arr[0].then(res => res) })...
asked Jan 25, 2021 in Technique[技术] by 深蓝 (71.8m points)
To see more, click for the full list of questions or popular tags.
Ask a question:
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...