Repository: common-workflow-language/schema_salad (language: python)

Issue:
The value of copyFrom.fetcher is not used in the LoadingOptions constructor in typescript
The value of copyFrom.fetcher is not used in the LoadingOptions constructor  in schema_salad/typescript/util/LoadingOptions.ts .

```typescript
const original = new LoadingOptions({fetcher: new TestFetcher()})
it('should have the same Fetcher as the original', async () => {
   const copy = new LoadingOptions({copyFrom:original})
   assert.equal(copy.fetcher,original.fetcher)
})
```

This test fails.


Discussion / hints:

Fix patch:
diff --git a/schema_salad/typescript/util/LoadingOptions.ts b/schema_salad/typescript/util/LoadingOptions.ts
index 9b877b7ab..ae1a5d973 100644
--- a/schema_salad/typescript/util/LoadingOptions.ts
+++ b/schema_salad/typescript/util/LoadingOptions.ts
@@ -25,7 +25,7 @@ export class LoadingOptions {
     if (copyFrom != null) {
       this.idx = copyFrom.idx
       if (fetcher === undefined) {
-        this.fetcher = copyFrom.fetcher
+        fetcher = copyFrom.fetcher
       }
       if (fileUri === undefined) {
         this.fileUri = copyFrom.fileUri


Test patch:
diff --git a/schema_salad/typescript/test/LoadingOptions.spec.ts b/schema_salad/typescript/test/LoadingOptions.spec.ts
new file mode 100644
index 000000000..17c2c8fa9
--- /dev/null
+++ b/schema_salad/typescript/test/LoadingOptions.spec.ts
@@ -0,0 +1,29 @@
+import { assert } from 'chai'
+import { Fetcher, LoadingOptions } from '../util/Internal'
+
+class TestFetcher implements Fetcher {
+  checkExists(url: string): boolean {
+    return true
+  }
+  async fetchText(url: string, contentTypes?: string[] | undefined): Promise<string> {
+    return "TestFetcher"
+  }
+  urljoin(baseUrl: string, url: string): string {
+    return `${baseUrl}/${url}`
+  }
+}
+
+describe('Test LoadingOptions', () => {
+  describe('copyFrom', () => {
+    const original = new LoadingOptions({fetcher: new TestFetcher()})
+    it('should have the same Fetcher as the original', async () => {
+      const copy = new LoadingOptions({copyFrom:original})
+      assert.equal(copy.fetcher,original.fetcher)
+    })
+    it('fetcher should take precedence over copyFrom', async () => {
+      const fetcher = new TestFetcher()
+      const copy = new LoadingOptions({fetcher,copyFrom:original})
+      assert.equal(copy.fetcher,fetcher)
+    })
+  })
+})