```ts
function linkFind(line: string, opens: string, closes: string): string[] {
  const result: string[] = [];
  let depth = 0;
  let start = -1;

  for (let i = 0; i < line.length; i++) {
    if (line[i] === opens) {
      if (depth === 0 && start === -1) {
        start = i;
      }
      depth++;
    } else if (line[i] === closes) {
      depth--;
      if (depth === 0) {
        result.push(line.slice(start + 1, i));
        start = -1;
      }
    }
  }

  return result;
}
```