profile
viewpoint
Tsotne Nazarashvili thecotne Tbilisi, Georgia

akalongman/sublimetext-codeformatter 764

Code Formatter plugin for ST2/ST3

akalongman/sublimetext-stringutilities 82

Sublime Text 2/3 plugin for string manipulations

akalongman/sublimetext-autobackups 65

Sublime Text 2/3 Auto backups plugin

Girchi/girchi-com-ui 8

Girchi.com UI

thecotne/devtime-ge 8

დეველოპერების დროა!

Girchi/girchi-com-frontend 1

[EXPERIMENTAL] girchi.com frontend implemented in React

thecotne/awesome-georgian-talks 1

This is mirror of previous awesome-georgian-talks.

thecotne/find-expired-domains 1

find expired domains

thecotne/alias-regex-webpack-plugin 0

Webpack plugin that enables overriding module import paths using a regex match and a replacement

thecotne/anchorjs 0

Add deep anchor links to your docs.

push eventthecotne/stateless-app

Cotne Nazarashvili

commit sha 47bb62256cdfa3da239df98942bdbf69af3c9a98

update node

view details

Cotne Nazarashvili

commit sha aeb681e5b2407ea75b40558d4c821c60d38b0645

yarn upgrade

view details

Cotne Nazarashvili

commit sha 0a513461e1f5cad6aa4dcc9e52e6e6d09ebf8dc4

update flow usage

view details

Tsotne Nazarashvili

commit sha 5d6e4f552c64a4ca56453388ec7afc1de80a9590

yarn upgrade

view details

push time in 5 days

issue commentthecotne/webpack-glob-entry

unexpected results using an exclusion pattern

this package (which is just 43 lines of code) is my take on left-pad like stupid simple code on npm/github ...

you don't actually need it. you can use this code (which does what you wanted) that i wrote in like 15 minutes or you can write your own function or two to achieve what you need ...

brewster1134

comment created time in 6 days

issue closedthecotne/webpack-glob-entry

unexpected results using an exclusion pattern

i currently have a directory with the following files:

console.ts
console.sass
console.test.ts
core.ts
core.test.ts
handler.ts
package.json
README.md
service.ts

when i use normal pattern... ./*.ts

console.log(entry('./*.ts'))
{
  console: './console.test.ts',
  core: './core.test.ts',
  handler: './handler.ts',
  service: './service.ts'
}

which is not what i want, since i want to exclude the .test.ts files


so when i use an exclusion pattern... ./*[!.test].ts

console.log(entry('./*[!.test].ts'))
{
  handler: './handler.ts'
}

which makes no sense to me.


so then i try add the ? operation... ./*[!.test]?.ts

console.log(entry('./*[!.test]?.ts'))
{
  console: './console.ts',
  core: './core.ts',
  service: './service.ts'
}

which also makes no sense, but is oddly the other files i need...


so then if i add both... './*[!.test]?.ts', './*[!.test].ts'

console.log(entry('./*[!.test]?.ts', './*[!.test].ts'))
{
  console: './console.ts',
  core: './core.ts',
  service: './service.ts',
  handler: './handler.ts'
}

which is exactly what i want...


can anyone make any sense of this? i have been racking my brain. i at least have a workaround, but it is driving me a bit crazy not understanding why.

closed time in 6 days

brewster1134

issue commentthecotne/webpack-glob-entry

unexpected results using an exclusion pattern

i am closing this since extending node-glob and/or adding other options to achieve behaviour of Negative Lookbehind is out of scope for this package

brewster1134

comment created time in 6 days

issue commentthecotne/webpack-glob-entry

unexpected results using an exclusion pattern

i don't think Negative Lookbehind is possible with node-glob here is example of how to do this with regex using this pattern /(?<!\.test)\.ts$/ (matches anything that ends with .ts but does not have .test before that)

brewster1134

comment created time in 6 days

issue commentthecotne/webpack-glob-entry

unexpected results using an exclusion pattern

@brewster1134 i am confused do you have ts files or coffee files?

this test passes for me so i am confused as to what is a problem (i guess because of collision in module names which means if files come in different order then result will be different that what i got in my tests)

it('issue #105', () => {
  mockFs({
    'console.ts': '',
    'console.sass': '',
    'console.test.ts': '',
    'core.ts': '',
    'core.test.ts': '',
    'handler.ts': '',
    'package.json': '',
    'README.md': '',
    'service.ts': ''
  })

  var expectedResult = {
    console: './console.ts',
    core: './core.ts',
    handler: './handler.ts',
    service: './service.ts'
  }

  var result = entry(entry.basePath(), './*.ts')

  expect(result).toEqual(expectedResult)
})

you can look into docs of node-glob to figure out how to correctly exclude test files https://github.com/isaacs/node-glob#glob-primer

brewster1134

comment created time in 6 days

fork thecotne/rust-clippy

A bunch of lints to catch common mistakes and improve your Rust code

https://rust-lang.github.io/rust-clippy/

fork in a month

startedrust-lang/rust

started time in a month

issue commentJSMonk/hegel

How to write a clone function?


// Could not deduce type "(ArrayLike<T> | Iterable<T>) => Array<T>" arising from the arguments unknown,(ArrayLike<T> | Iterable<T>) => Array<T>.
// Please, provide type parameters for the call or provide default type value for parameters
// of "<T>(T, T) => T" function.
// WAT??
const clone01 = arr => Array.from(arr)

// (ArrayLike<T> | Iterable<T>) => Array<T>
// this is same but works
function clone01_1(arr) {
    return Array.from(arr)
}


// <T>(T) => $Immutable<Array<T | unknown>>
// this one looks wrong
const clone02 = arr => [].concat(arr)

try

mohsen1

comment created time in a month

startednvie/decoders

started time in a month

issue commentJSMonk/hegel

Covariance / Contravariance for generics?

@leunam217 immutability should be part of type system and should not leak artifacts to production code

you have introduced wrapper class but it is only used for type checking

MaxGraey

comment created time in a month

issue commentcssnano/cssnano

[Bug] : broken declarations due to unitless 0 inside `max()`

@anikethsaha still not published?

hacknug

comment created time in 2 months

fork thecotne/source-map-unpack

Unpack 🛍 your JS source maps 🗺 to original files and folders.

fork in 2 months

issue commentJSMonk/hegel

Porting TypeScript's 'declare const' to Hegel

facts:

  • hegel does not have any (you should not need any in typed language)
  • hegel does not allow declare inside js file (i think it would be better to allow this)
  • hegel does not have indexer properties (there are some attempts currently but it does not really work yet #238 #144)

what you can do is to declare globals in .d.ts file and if needed ignore line where you are assigning to global variable with @hegel-issue

adkelley

comment created time in 2 months

pull request commentreasonml-community/bs-fetch

Remove bs-platform as peerDep

it was correct actually since in compiled js it needs access to bs-platform https://github.com/reasonml-community/bs-fetch/blob/master/lib/js/src/Fetch.js#L3 so if you someone wants to use that from js they need bs-platform for it to work

yawaramin

comment created time in 2 months

fork thecotne/Awesome-Profile-README-templates

A collection of awesome readme templates to display on your profile

fork in 2 months

issue commentJSMonk/hegel

Variable "console" is not defined!

@Yamboy1 your repo is private or does not exist at all...

Yamboy1

comment created time in 2 months

create barnchthecotne/thecotne

branch : master

created branch time in 2 months

created repositorythecotne/thecotne

created time in 2 months

startedsdolidze/techjobs.ge

started time in 2 months

issue commentJSMonk/hegel

Path "stream" cannot be resolved

this is how you do it https://github.com/JSMonk/hegel/blob/master/packages/cli/.hegelrc#L7-L9

takase1121

comment created time in 2 months

issue commentJSMonk/hegel

How to use with react?

you can't... #37

hmarat

comment created time in 2 months

issue commentJSMonk/hegel

Support computed property name

WhAT tHe TrIn?

const foo: string = 'foo'
const bar = 'bar'

function createObj(key, prop) {
    return {
        [key]: prop
    }
}

const objWithFoo = createObj(foo, 42)
const objWithBar = createObj(bar, 44)

const result = objWithFoo.trin + objWithBar.bar;

try

artalar

comment created time in 2 months

CommitCommentEvent

issue commentJSMonk/hegel

separate projects for playground and docs

turns out Theia IDE needs backend service to function (as does VS Code Online)

Theia is not designed to run without the backend. It relies on many JSON-RPC services, e.g. to provide languages or filesystem access. In theory, if you can reimplement them when it is possible, but it would be a lot of development and maintenance work.

https://github.com/eclipse-theia/theia/issues/6560#issuecomment-554605358


but there is monaco-languageclient which should be useful (i have not tried it yet)

thecotne

comment created time in 2 months

issue commentJSMonk/hegel

recursive function return type inference

should have searched for similar issue before reporting ....

thecotne

comment created time in 2 months

issue closedJSMonk/hegel

recursive function return type inference

function fac(n: number) {
    if (n <= 0) {
        return 1// Type "1" is incompatible with type "_b"
    } else {
        return n * fac(n - 1)// Parameter "_b" is incompatible with restriction "$StrictUnion<bigint | number>"
    }
}

try

closed time in 2 months

thecotne

issue openedJSMonk/hegel

recursive function return type inference

function fac(n: number) {
    if (n <= 0) {
        return 1// Type "1" is incompatible with type "_b"
    } else {
        return n * fac(n - 1)// Parameter "_b" is incompatible with restriction "$StrictUnion<bigint | number>"
    }
}

try

created time in 2 months

issue commentJSMonk/hegel

Support computed property name

@JSMonk how would you type createObj manually?

this does not work

const propertyName = 'propertyName'

function createObj<_a: number | string | symbol, _b>(key: _a, prop: _b): { _a: _b } {
    return {
        [key]: prop
    }
}

const obj = createObj(propertyName, 42)

const keyValue = obj.key
const propertyNameValue = obj.propertyName
artalar

comment created time in 2 months

issue commentJSMonk/hegel

Cannot read property 'argumentsTypes' of undefined

you need to exclude node_modules and most of your files and try to run hegel on few files or on specific files at a time to find what is causing that error since that is not type error it's hegel crashing with that message so it does not report where in code problem is located

i have similar attempt documented here #208

manast

comment created time in 3 months

issue commentJSMonk/hegel

Hegel and JSX

@trusktr hegel is using babel parser and babel AST so babel plugins can be used as well

unrealsolver

comment created time in 3 months

issue commentJSMonk/hegel

Hegel and JSX

@ryansolid if we make plugins used by hegel configurable we can support any number of frameworks/libraries

for example with babel-plugin-jsx-dom-expressions we can support DOM Expressions like so

Screen Shot 2020-06-22 at 08 06 10

unrealsolver

comment created time in 3 months

issue commentJSMonk/hegel

Hegel and JSX

we can just add @babel/plugin-transform-react-jsx plugin and most of jsx will work without much effort

also type system will have same behaviour on jsx and React.createElement code

Screen Shot 2020-06-22 at 07 33 38

unrealsolver

comment created time in 3 months

push eventthecotne/hegel

Demetri0

commit sha aa4e1cd74439457ecb5f878cd77a700656b1bd36

annotate Array.push with $Throws<TypeError> Array.protorype.push throws TypeError in case len + argCount > 2**53 - 1 Reference: - https://tc39.es/ecma262/#sec-array.prototype.push

view details

Demetri0

commit sha 62e242ee58b27bc06dd468abf90b04672b64812d

annotate Array.push with $Throws<TypeError | RangeError> Array.prototype.push throws TypeError in case len + argCount > 2**53 - 1 and RangeError in case len + argCount > 2**32 - 1 that specified in Object Type Reference: - https://www.ecma-international.org/ecma-262/6.0/#sec-object-type - https://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.push

view details

Demetri0

commit sha 68ac1d74c4f63276f28f54e9e5e89a336cfdb86e

annotate ArrayConstructor with $Throws<TypeError | RangeError> Reference: - https://www.ecma-international.org/ecma-262/6.0/#sec-object-type

view details

Demetri0

commit sha cf446ed0ad15d9bbf0cb1d29c23240dc1c6874c6

anotate Array with $Throws References: - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array - https://tc39.es/ecma262/#sec-array-constructor

view details

Demetri0

commit sha 7c7d7ac4fbe512a5ee345086972ff578708b252f

annotate ArrayBufferConstructor with $Throws<TypeError | RangeError>

view details

Demetri0

commit sha 839c119916c3706a7eec653dd0cda94027f0bdf0

annotate reduce & reduceRight methods of Arrays with $Thwors<TypeError>

view details

Demetri0

commit sha f3c91be48d07d14fd1f15586f0833b124e45264c

Merge branch 'master' of https://github.com/JSMonk/hegel into annotate-standard-exceptions-indexec-collections

view details

Demetri0

commit sha 30b9f29e11628af1f5d4b8c7848afce9aca360e9

Merge branch 'master' of https://github.com/JSMonk/hegel into annotate-standard-exceptions-indexec-collections

view details

Demetri0

commit sha d9af6d4996fe10b930df06c342a229fc56d224fa

Merge branch 'master' into annotate-standard-exceptions-indexec-collections

view details

Yevhen

commit sha 3433358c78220430ed8301a9d68529e43c69d60f

Merge pull request #11 from JSMonk/master Update fork

view details

Demetri0

commit sha d81a42415da0c973eef48d4e2a8ab8aabb73ddd1

annotate ReadonlyArray.concat with $Throws<TypeError | RangeError>

view details

Demetri0

commit sha 4504a2c123c74dfffce7fb3cbf18dc6cf893e426

annotate eval with $Throws

view details

Demetri0

commit sha 6c559a5387d7423da7fe04e008e05b037f6150ba

annotate Function properties with $Throws

view details

Demetri0

commit sha b1affb1a666016f88273dac058114bf448c7a497

merge with master

view details

Demetri0

commit sha b5d09be8d13ba6549eee9b2246c1f7dd13306273

remove extra comment lines

view details

Demetri0

commit sha cecdeb79c820ed8e49aec69772722a55de1df4c6

annotate Global Objects / Object with $Throws

view details

Demetri0

commit sha af6db7cb55a8c76f411d5d9d6028ff08e72894a9

annotate Number with $Throws<RangeError>

view details

Demetri0

commit sha 177076178f0d836af4ebce78370158c2af28f009

annotate Time.toISOString with $Throws<RangeError>

view details

Demetri0

commit sha e0e6c55f50f1f8b0b74f03969e948c762fc8d78d

annotate String.repeat with $Throws<RangeError>

view details

Yevhen

commit sha a93ef9b8dec3d0b393bd5d737a57e7a29b6b196c

Merge pull request #12 from JSMonk/master Update fork

view details

push time in 3 months

more