Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
eddie murphy committed Dec 7, 2024
1 parent 4b02d1a commit 2160ce4
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 1 deletion.
11 changes: 11 additions & 0 deletions content/fe/ts-type-action/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "TypeSctipt类型实战"
date: "2024-11-22 13:04:35"
draft: true
type: posts
tags:
- all
- ts
categories:
- all
---
16 changes: 16 additions & 0 deletions content/fe/ts-type-action/t0.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
interface Config {
name: string
age: number
}

export function mergeConfig(c, k, v) {
c[k] = v
}

const s1: Config = {
name: 'dd',
age: 1
}

mergeConfig(s1, 'name', 11)
mergeConfig(s1, 'nothing', 11)
20 changes: 20 additions & 0 deletions content/fe/ts-type-action/t1.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
interface Config {
name: string
age: number
}

export function mergeConfig(c, k, v) {
c[k] = v
}

// function mergeConfig<T, K extends keyof T> (c: T, k: K, v: T[K]) {
// c[k] = v
// }

// const s1: Config = {
// name: 'dd',
// age: 1
// }

// mergeConfig(s1, 'name', 11)
// mergeConfig(s1, 'nothing', 11)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion content/kamailio/docs-index/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ wiki部分主要是一些教程,非常值得看。

![](atta/2024-12-02-23-07-06.png)

## 全部函数索引

在km的wiki官网,即https://www.kamailio.org/wikidocs/, 其中Alphabetic Indexes就是所有的参数或者函数的索引。

在你学些km的脚本时,有时候想知道某个函数在哪个模块中,就可以用这个全部函数索引中查找。

![](atta/2024-12-07-11-37-37.png)


## 源码安装

这部分讲解如何通过GIT进行源码安装。
Expand All @@ -61,4 +70,4 @@ https://www.kamailio.org/wikidocs/tutorials/faq/main/

# 总结

总体来说,km的文档算是非常完整了,但是相比于OpenSIPS, 还是缺少一个全局的函数指引,例如我知道函数名,但是不知道是在哪一个模块里,想找到这个模块,就只能靠搜索引擎的支持了
总体来说,km的文档算是非常完整了,但是和OpenSIPS相比,还有待加强

0 comments on commit 2160ce4

Please sign in to comment.