@teambit/schema 0.0.740 → 0.0.743

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -68,3 +68,13 @@ interface config {
68
68
  };
69
69
  }
70
70
  export declare type IndexedAccessType = config['someField'];
71
+ declare const computedName = "str";
72
+ export interface ComputedNameWithType {
73
+ [computedName]: boolean;
74
+ }
75
+ export interface ComputedNameNoType {
76
+ [computedName]: any;
77
+ }
78
+ declare type World1 = 'world1-a' | 'world1-b';
79
+ declare type World2 = 'world2';
80
+ export declare type templateLiteralType = `hello ${World1} hi ${World2}`;
@@ -106,10 +106,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
106
106
  */
107
107
  function myFunc(a = 4, b = 5) {
108
108
  return a + b;
109
- } // import { Bar } from './button';
110
- // export { Button } from './button';
111
- // export type { ButtonProps } from './button';
112
-
109
+ }
113
110
 
114
111
  function Hi() {}
115
112
 
@@ -150,10 +147,7 @@ exports.ClassSomething = ClassSomething;
150
147
  const obj = {
151
148
  a: 1,
152
149
  b: 2
153
- }; // export const obj = () => ({ a: 1, b: 2 });
154
- // export function getObj(a: string) { return { a: 1, b: 2 } };
155
- // export function getObj(a: string, func: (b: number) => string, { a: any }) { return { a: 1, b: 2 } };
156
-
150
+ };
157
151
  const a1 = {
158
152
  a: 5,
159
153
  b: 9
@@ -208,4 +202,6 @@ async function arrayBindingElements([prop]) {
208
202
  return prop;
209
203
  }
210
204
 
205
+ const computedName = 'str';
206
+
211
207
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["myFunc","a","b","Hi","HiThere","Function","Array","Foo","ClassSomething","constructor","da","getter","setter","obj","a1","Bar","foo","getBar","bar","tuple","c","Food","getPromise","T1","T2","T3","typePredicateFn","str","typePredicateNoTypeFn","condition","msg","objectBindingElements","prop","arrayBindingElements"],"sources":["index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-function */\n/* eslint-disable @typescript-eslint/no-shadow */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable @typescript-eslint/prefer-as-const */\n/* eslint-disable one-var */\n/* eslint-disable max-classes-per-file */\n/**\n *\n * @param a this is A\n * @param b this is B\n * @returns\n */\nexport function myFunc(a = 4, b = 5): number {\n return a + b;\n}\n\n// import { Bar } from './button';\n\n// export { Button } from './button';\n// export type { ButtonProps } from './button';\nexport * from './button';\n\nexport function Hi() {}\n\nexport const a = 4,\n b: 5 = 5;\n\nexport * as Compositions from './button.composition';\n\nexport const HiThere = 'HiThere';\n\nexport const Function = () => {};\n\nexport const Array = ['hi', 'there'];\n\nclass Foo {}\n\nclass ClassSomething {\n app = '';\n constructor(readonly da: 'dsa') {}\n\n a() {\n return new Foo();\n }\n get getter() {\n return 'hi';\n }\n\n set setter(a: boolean) {}\n}\n\nexport { ClassSomething };\n\nexport type IndexSig = { [key: string]: boolean };\n\nexport interface Hello {\n propertySig: () => void;\n methodSig(): string;\n}\n\nconst obj = { a: 1, b: 2 };\n// export const obj = () => ({ a: 1, b: 2 });\n// export function getObj(a: string) { return { a: 1, b: 2 } };\n// export function getObj(a: string, func: (b: number) => string, { a: any }) { return { a: 1, b: 2 } };\n\nexport const a1: typeof obj = { a: 5, b: 9 };\n\nexport type TypeOperator = keyof typeof obj;\n\n// this is for Jump in the definition\nclass Bar {\n foo() {}\n}\nexport const getBar = (bar: Bar) => new Bar();\n\nexport const tuple = ([a, b, c]: [string, Function, Record<string, any>]) => {};\n\nexport enum Food {\n Falafel,\n Hummus,\n Tahini,\n}\n\nexport async function getPromise(): Promise<string> {\n return 'promise';\n}\n\nclass T1 {}\nclass T2 {}\nclass T3<T, K> {}\nexport type TypeRefWithArgs = T3<T1, T2>;\n\nexport type ParenthesizedType = (T1 | T2)[];\n\nexport function typePredicateFn(str: any): str is string {\n return str;\n}\n\nexport function typePredicateNoTypeFn(condition: any, msg?: string): asserts condition {}\n\nexport async function objectBindingElements({ prop = 1 }) {\n return prop;\n}\nexport async function arrayBindingElements([prop]: [string]) {\n return prop;\n}\n\ninterface config {\n someField: { a: string; b: boolean };\n}\nexport type IndexedAccessType = config['someField'];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;AApBA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,MAAT,CAAgBC,CAAC,GAAG,CAApB,EAAuBC,CAAC,GAAG,CAA3B,EAAsC;EAC3C,OAAOD,CAAC,GAAGC,CAAX;AACD,C,CAED;AAEA;AACA;;;AAGO,SAASC,EAAT,GAAc,CAAE;;AAEhB,MAAMF,CAAC,GAAG,CAAV;AAAA,MACLC,CAAI,GAAG,CADF;;;AAKA,MAAME,OAAO,GAAG,SAAhB;;;AAEA,MAAMC,QAAQ,GAAG,MAAM,CAAE,CAAzB;;;AAEA,MAAMC,KAAK,GAAG,CAAC,IAAD,EAAO,OAAP,CAAd;;;AAEP,MAAMC,GAAN,CAAU;;AAEV,MAAMC,cAAN,CAAqB;EAEnBC,WAAW,CAAUC,EAAV,EAAqB;IAAA,KAAXA,EAAW,GAAXA,EAAW;IAAA,6CAD1B,EAC0B;EAAE;;EAElCT,CAAC,GAAG;IACF,OAAO,IAAIM,GAAJ,EAAP;EACD;;EACS,IAANI,MAAM,GAAG;IACX,OAAO,IAAP;EACD;;EAES,IAANC,MAAM,CAACX,CAAD,EAAa,CAAE;;AAXN;;;AAuBrB,MAAMY,GAAG,GAAG;EAAEZ,CAAC,EAAE,CAAL;EAAQC,CAAC,EAAE;AAAX,CAAZ,C,CACA;AACA;AACA;;AAEO,MAAMY,EAAc,GAAG;EAAEb,CAAC,EAAE,CAAL;EAAQC,CAAC,EAAE;AAAX,CAAvB;;;AAIP;AACA,MAAMa,GAAN,CAAU;EACRC,GAAG,GAAG,CAAE;;AADA;;AAGH,MAAMC,MAAM,GAAIC,GAAD,IAAc,IAAIH,GAAJ,EAA7B;;;;AAEA,MAAMI,KAAK,GAAG,CAAC,CAAClB,CAAD,EAAIC,CAAJ,EAAOkB,CAAP,CAAD,KAAwD,CAAE,CAAxE;;;IAEKC,I;;;WAAAA,I;EAAAA,I,CAAAA,I;EAAAA,I,CAAAA,I;EAAAA,I,CAAAA,I;GAAAA,I,oBAAAA,I;;AAML,eAAeC,UAAf,GAA6C;EAClD,OAAO,SAAP;AACD;;AAED,MAAMC,EAAN,CAAS;;AACT,MAAMC,EAAN,CAAS;;AACT,MAAMC,EAAN,CAAe;;AAKR,SAASC,eAAT,CAAyBC,GAAzB,EAAkD;EACvD,OAAOA,GAAP;AACD;;AAEM,SAASC,qBAAT,CAA+BC,SAA/B,EAA+CC,GAA/C,EAAgF,CAAE;;AAElF,eAAeC,qBAAf,CAAqC;EAAEC,IAAI,GAAG;AAAT,CAArC,EAAmD;EACxD,OAAOA,IAAP;AACD;;AACM,eAAeC,oBAAf,CAAoC,CAACD,IAAD,CAApC,EAAsD;EAC3D,OAAOA,IAAP;AACD"}
1
+ {"version":3,"names":["myFunc","a","b","Hi","HiThere","Function","Array","Foo","ClassSomething","constructor","da","getter","setter","obj","a1","Bar","foo","getBar","bar","tuple","c","Food","getPromise","T1","T2","T3","typePredicateFn","str","typePredicateNoTypeFn","condition","msg","objectBindingElements","prop","arrayBindingElements","computedName"],"sources":["index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-function */\n/* eslint-disable @typescript-eslint/no-shadow */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable @typescript-eslint/prefer-as-const */\n/* eslint-disable one-var */\n/* eslint-disable max-classes-per-file */\n/**\n *\n * @param a this is A\n * @param b this is B\n * @returns\n */\nexport function myFunc(a = 4, b = 5): number {\n return a + b;\n}\n\nexport * from './button';\n\nexport function Hi() {}\n\nexport const a = 4,\n b: 5 = 5;\n\nexport * as Compositions from './button.composition';\n\nexport const HiThere = 'HiThere';\n\nexport const Function = () => {};\n\nexport const Array = ['hi', 'there'];\n\nclass Foo {}\n\nclass ClassSomething {\n app = '';\n constructor(readonly da: 'dsa') {}\n\n a() {\n return new Foo();\n }\n get getter() {\n return 'hi';\n }\n\n set setter(a: boolean) {}\n}\n\nexport { ClassSomething };\n\nexport type IndexSig = { [key: string]: boolean };\n\nexport interface Hello {\n propertySig: () => void;\n methodSig(): string;\n}\n\nconst obj = { a: 1, b: 2 };\n\nexport const a1: typeof obj = { a: 5, b: 9 };\n\nexport type TypeOperator = keyof typeof obj;\n\n// this is for Jump in the definition\nclass Bar {\n foo() {}\n}\nexport const getBar = (bar: Bar) => new Bar();\n\nexport const tuple = ([a, b, c]: [string, Function, Record<string, any>]) => {};\n\nexport enum Food {\n Falafel,\n Hummus,\n Tahini,\n}\n\nexport async function getPromise(): Promise<string> {\n return 'promise';\n}\n\nclass T1 {}\nclass T2 {}\nclass T3<T, K> {}\nexport type TypeRefWithArgs = T3<T1, T2>;\n\nexport type ParenthesizedType = (T1 | T2)[];\n\nexport function typePredicateFn(str: any): str is string {\n return str;\n}\n\nexport function typePredicateNoTypeFn(condition: any, msg?: string): asserts condition {}\n\nexport async function objectBindingElements({ prop = 1 }) {\n return prop;\n}\nexport async function arrayBindingElements([prop]: [string]) {\n return prop;\n}\n\ninterface config {\n someField: { a: string; b: boolean };\n}\nexport type IndexedAccessType = config['someField'];\n\nconst computedName = 'str';\nexport interface ComputedNameWithType {\n [computedName]: boolean;\n}\nexport interface ComputedNameNoType {\n [computedName];\n}\n\ntype World1 = 'world1-a' | 'world1-b';\ntype World2 = 'world2';\nexport type templateLiteralType = `hello ${World1} hi ${World2}`;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;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