profile
viewpoint

Jojoshua/TypedTabulator 4

This is a sample Tabulator project using TypeScript type definitions.

Jojoshua/haengematte 1

example applications for basic crud features in different languages

Jojoshua/BlockSolve-CSharp 0

BlockSolve C#

Jojoshua/BlockSolve-Java 0

BlockSolve-Java

Jojoshua/BlockSolve-Rust 0

Block Solver

Jojoshua/DefinitelyTyped 0

The repository for high quality TypeScript type definitions.

Jojoshua/formBuilder 0

A jQuery plugin for drag and drop form creation

Jojoshua/Hangfire 0

An easy way to perform background job processing in your .NET and .NET Core applications. No Windows Service or separate process required

Jojoshua/Permutations 0

Permutations

Jojoshua/tabulator 0

Interactive Tables and Data Grids for JavaScript

issue commentdotnet/ef6

Migration History is getting overwritten

Just experienced this as well on high availability sql server using EF 6.4 Fails on the ExecuteSqlCommand statement because it thinks there are pending migrations.

My setup goes like this...

protected void Application_Start()
{
   SetInitializer();
 }

public static void SetInitializer()
{
   Database.SetInitializer(new MigrateDatabaseToLatestVersion<MyContext, Configuration>());

   //Force any pending migrations to run
   var db = new MyContext();
   db.Database.ExecuteSqlCommand("select 1");
   db.Dispose();
}

danielmackay

comment created time in 15 days

pull request commentDefinitelyTyped/DefinitelyTyped

[tabulator-tables] Update properties using MenuObject

Ready to merge @zanatoshi?

zanatoshi

comment created time in 16 days

PR closed DefinitelyTyped/DefinitelyTyped

tabulator-tables-4.6 Specify ui event type Author is Owner Perf: Same

Please fill in this template.

  • [x] Test the change in your own code. (Compile and run.)
  • [x] Use a meaningful title for the pull request. Include the name of the package modified.
  • [x] Add or edit tests to reflect the change. (Run with npm test.)
  • [x] Follow the advice from the readme.
  • [x] Avoid common mistakes.
  • [x] Run npm run lint package-name (or tsc if no tslint.json is present).

If changing an existing definition:

  • [x] Provide a URL to documentation or source code which provides context for the suggested changes: << http://tabulator.info/docs/4.6/callbacks#column>>
  • [x] If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.
  • [x] Include tests for your changes
  • [x] If you are making substantial changes, consider adding a tslint.json containing { "extends": "dtslint/dt.json" }. If for reason the any rule need to be disabled, disable it for that line using // tslint:disable-next-line [ruleName] and not for whole package so that the need for disabling can be reviewed.
+6 -6

2 comments

2 changed files

Jojoshua

pr closed time in 18 days

pull request commentDefinitelyTyped/DefinitelyTyped

[tabulator-tables] Update properties using MenuObject

Yes if you could just add the UIEvent

zanatoshi

comment created time in 18 days

pull request commentDefinitelyTyped/DefinitelyTyped

[tabulator-tables] Update properties using MenuObject

Good update @zanatoshi . While we have this PR could you also include the pending changes listed here so it can be merged together? https://github.com/DefinitelyTyped/DefinitelyTyped/pull/44743/files

zanatoshi

comment created time in 18 days

PR closed DefinitelyTyped/DefinitelyTyped

tabulator-tables-4.6 Specify ui event type Author is Owner Perf: Same

Please fill in this template.

  • [x] Test the change in your own code. (Compile and run.)
  • [x] Use a meaningful title for the pull request. Include the name of the package modified.
  • [x] Add or edit tests to reflect the change. (Run with npm test.)
  • [x] Follow the advice from the readme.
  • [x] Avoid common mistakes.
  • [x] Run npm run lint package-name (or tsc if no tslint.json is present).

If changing an existing definition:

  • [x] Provide a URL to documentation or source code which provides context for the suggested changes: << http://tabulator.info/docs/4.6/callbacks#column>>
  • [x] If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.
  • [x] Include tests for your changes
  • [x] If you are making substantial changes, consider adding a tslint.json containing { "extends": "dtslint/dt.json" }. If for reason the any rule need to be disabled, disable it for that line using // tslint:disable-next-line [ruleName] and not for whole package so that the need for disabling can be reviewed.
+6 -6

3 comments

2 changed files

Jojoshua

pr closed time in 19 days

PR opened DefinitelyTyped/DefinitelyTyped

tabulator-tables-4.6 Specify ui event type

Please fill in this template.

  • [x] Test the change in your own code. (Compile and run.)
  • [x] Use a meaningful title for the pull request. Include the name of the package modified.
  • [x] Add or edit tests to reflect the change. (Run with npm test.)
  • [x] Follow the advice from the readme.
  • [x] Avoid common mistakes.
  • [x] Run npm run lint package-name (or tsc if no tslint.json is present).

If changing an existing definition:

  • [x] Provide a URL to documentation or source code which provides context for the suggested changes: << http://tabulator.info/docs/4.6/callbacks#column>>
  • [x] If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.
  • [x] Include tests for your changes
  • [x] If you are making substantial changes, consider adding a tslint.json containing { "extends": "dtslint/dt.json" }. If for reason the any rule need to be disabled, disable it for that line using // tslint:disable-next-line [ruleName] and not for whole package so that the need for disabling can be reviewed.
+6 -6

0 comment

2 changed files

pr created time in 19 days

create barnchJojoshua/DefinitelyTyped

branch : tabulator-tables-4.6-updates-2

created branch time in 19 days

issue closedolifolkerd/tabulator

Tabbing to a new row causes problem with programmatic row management and data loss

Describe the bug Tabbing to insert rows doesn't seem to register something internally the same as table.addRow would causing focus and row management issues.

Tabulator Info 4.6.3

To Reproduce: https://jsfiddle.net/jojoshua/wk9cL1ga/2/

  1. Click inside the 1st cell of the first row
  2. Press Tab to insert a 2nd row.
  3. Click the Delete Row button

Observe that both the 1st and 2nd row were deleted. At this point you can still click inside the first cell again though.

If the column was set to required, clicking inside the leftover cell throws Uncaught TypeError: e.getElement(...).focus is not a function https://jsfiddle.net/jojoshua/up36kgdh/3/

closed time in 20 days

Jojoshua

issue openedolifolkerd/tabulator

Tabbing to a new row causes problem with programmatic row management and data loss

Describe the bug Tabbing to insert rows doesn't seem to register something internally the same as table.addRow would causing focus and row management issues.

Tabulator Info 4.6.3

To Reproduce: https://jsfiddle.net/jojoshua/wk9cL1ga/2/

  1. Click inside the 1st cell of the first row
  2. Press Tab to insert a 2nd row.
  3. Click the Delete Row button

Observe that both the 1st and 2nd row were deleted. At this point you can still click inside the first cell again though.

If the column was set to required, clicking inside the leftover cell throws Uncaught TypeError: e.getElement(...).focus is not a function https://jsfiddle.net/jojoshua/up36kgdh/3/

created time in 20 days

issue commentmicrosoft/TypeScript

[Infrastructure] [DefinitelyTyped Tooling] - Automatically merge PR from only Author

It's also possible that an error occurred with the DefinitelyTyped PR build I noted above and I am not seeing something or the system isn't working properly. I noticed the bot added Where is Travis? label.

Jojoshua

comment created time in 21 days

pull request commentDefinitelyTyped/DefinitelyTyped

tabulator-tables-4.6 Specify ui event type

Could you help out @uniqueiniquity ? The bot added Where is Travis? so was there an error running the build?

Jojoshua

comment created time in 21 days

issue commentmicrosoft/TypeScript

[Infrastructure] [DefinitelyTyped Tooling] - Automatically merge PR from only Author

I think that's what I am asking for but maybe it's my inexperience with Github is the issue. Is there already a way I can request my coworker to review my DefinitelyTyped PR? I don't see the section to add reviewers.

Jojoshua

comment created time in 21 days

issue commentmicrosoft/TypeScript

[Infrastructure] [DefinitelyTyped Tooling] - Automatically merge PR from only Author

So that is what I am getting at... the ability to for example ping my co-worker or heavy user of my definitions to perform the review.

Jojoshua

comment created time in 21 days

issue commentmicrosoft/TypeScript

[Infrastructure] [DefinitelyTyped Tooling] - Automatically merge PR from only Author

If you are trustworthy enough to enlist a second person to submit code in their name on your behalf on a regular basis, then it's probably OK that you're effectively self-merging.

If this is true @RyanCavanaugh then could an enhancement be made to allow the Author to request a code review from someone else? This would satisfy the preconditions as well.

Jojoshua

comment created time in 22 days

issue commentolifolkerd/tabulator

cell.edit(false) to force the editor to false even if editable is set to true

Ok thanks, will run with this. Keep up the good work.

Jojoshua

comment created time in 22 days

issue commentmicrosoft/TypeScript

[Infrastructure] [DefinitelyTyped Tooling] - Automatically merge PR from only Author

I understand the 2 person logic but the system can still be thwarted with 2 actual people whether friends or coworkers.

Jojoshua

comment created time in 22 days

issue commentolifolkerd/tabulator

cell.edit(false) to force the editor to false even if editable is set to true

So apparently the timeout is the key.

By adding a 2sec timeout here does cancel as expected https://jsfiddle.net/jojoshua/qLymad36/5/

Without a timeout the cancelEdit never registers and allows the user to keep editing. https://jsfiddle.net/jojoshua/3qokdubL/1/

Jojoshua

comment created time in 22 days

issue openedmicrosoft/TypeScript

[Infrastructure] [DefinitelyTyped Tooling] - Automatically merge PR from only Author

I have noticed new features relating to DefinitelyTyped merging features for the typescript-bot to allow automatically merging a PR if the Author approves changes that came from a different contributor. This works great.

I've noticed that for my type definitions which I am the only Author (even if I have added tests) this still seems to require approval from a DT maintainer to merge. The same logic should apply and allow the only Author to automatically merge their PR.

Today, I could essentially trick the system and simply create the PR using a different account and then allow the Author account to Review and approve the changes resulting in automatic merge.

created time in 22 days

issue commentolifolkerd/tabulator

cell.edit(false) to force the editor to false even if editable is set to true

Sorry, so for example something simple like this. If the user had clicked inside a cell to trigger the cellEditing event, do you expect they be "kicked out (loose focus and not save any changes they input)" after 2 seconds with this code?

(colDef.cellEditing = cell => { setTimeout(() => { cell.cancelEdit(); }, 2000); }),

Jojoshua

comment created time in 22 days

issue commentolifolkerd/tabulator

cell.edit(false) to force the editor to false even if editable is set to true

I am actually storing the column definition to database which has the editable property and then reloading the definition along with the table data.

I tried calling cell.cancelEdit() within the cellEditing event but it did not cancel the editing and also saved the data I entered, is that a bug?

Jojoshua

comment created time in 22 days

issue commentolifolkerd/tabulator

[Feature] cell.edit(false) to force the editor to false even if editable is set to true

What I am ultimately trying to do is come up with an "Append Only" mode where users can hit an Add Row button to add a new row and enter data but never edit previously saved data.

Jojoshua

comment created time in 22 days

issue commentolifolkerd/tabulator

[Feature] cell.edit(false) to force the editor to false even if editable is set to true

I still want to be able to set the editable to either true or false as it is being directly set when I load the table(saved from configuration).

I think I understand what you are saying in terms of the API language though..looking in those terms I believe what I am looking for is cancelEdit, is that right?

Jojoshua

comment created time in 22 days

push eventJojoshua/DefinitelyTyped

Jojoshua

commit sha eb001b3ce6cd3beb2ca40846f25e576018e2a77a

updated tests

view details

push time in 22 days

PR opened DefinitelyTyped/DefinitelyTyped

tabulator-tables-4.6 Specify ui event type

Please fill in this template.

  • [x] Use a meaningful title for the pull request. Include the name of the package modified.
  • [x] Test the change in your own code. (Compile and run.)
  • [x] Add or edit tests to reflect the change. (Run with npm test.)
  • [x] Follow the advice from the readme.
  • [x] Avoid common mistakes.
  • [x] Run npm run lint package-name (or tsc if no tslint.json is present).

If changing an existing definition:

  • [x] Provide a URL to documentation or source code which provides context for the suggested changes: << http://tabulator.info/docs/4.6/callbacks#column>>
  • [x] If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.
  • [x] Include tests for your changes
  • [x] If you are making substantial changes, consider adding a tslint.json containing { "extends": "dtslint/dt.json" }. If for reason the any rule need to be disabled, disable it for that line using // tslint:disable-next-line [ruleName] and not for whole package so that the need for disabling can be reviewed.
+4 -4

0 comment

1 changed file

pr created time in 22 days

create barnchJojoshua/DefinitelyTyped

branch : tabulator-tables-4.6-updates-1

created branch time in 22 days

issue openedolifolkerd/tabulator

[Feature] cell.edit(false) to force the editor to false even if editable is set to true

I would like to see the ability to override editable on a per cell basis using the cell.edit method.

The capability already exists for overriding to true but not to false. http://tabulator.info/docs/4.6/components#component-cell If you want to ignore the editable property of the column definition and force the edit, you can pass an optional value of true to the function cell.edit(true); //force the editor to open even if editable is set to false

Describe the solution you'd like Calling cell.edit(false) would force the editor to false even if editable is set to true

created time in 23 days

pull request commentDefinitelyTyped/DefinitelyTyped

@types/tabulator-tables: export default to repair broken type

This may be of help as well

https://github.com/angeliski/vue-tabulator/pull/2/files

MBerka

comment created time in a month

issue commentolifolkerd/tabulator

Cell Height is Shrunk For Empty Strings

I've noticed this as well and I hope this can be improved. Have you tried calling redraw as a workaround, maybe in the cell edited event?

nrayburn-tech

comment created time in a month

issue openedolifolkerd/tabulator

Deleting a row that failed validation causes mayhem

Describe the bug When deleting a row which has failed validation, the table does not allow clicking any other rows/cells and the table is unusable.

https://jsfiddle.net/jojoshua/axwfns7c/11/

Tabulator Info 4.6.2

To Reproduce

  1. Click the Add Row button
  2. Click inside the cell of the newly added 2nd row
  3. Click outside the table(below it is fine). This causes the red validation error to display because this is set as required validator
  4. Click the Delete Row button
  5. Click on the cell of the existing first row. Observe thrown error e.getElement(...).focus is not a function is thrown in browser console. From here on out the Add Row button will add rows but cells are not editable. The table is completely out of whack.

created time in a month

PR opened DefinitelyTyped/DefinitelyTyped

tabulator-tables 4.6 updates

Please fill in this template.

  • [x] Use a meaningful title for the pull request. Include the name of the package modified.
  • [x] Test the change in your own code. (Compile and run.)
  • [x] Add or edit tests to reflect the change. (Run with npm test.)
  • [x] Follow the advice from the readme.
  • [x] Avoid common mistakes.
  • [x] Run npm run lint package-name (or tsc if no tslint.json is present).

If changing an existing definition:

  • [x] Provide a URL to documentation or source code which provides context for the suggested changes: <http://tabulator.info/docs/4.6>
  • [x] If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.
  • [x] Include tests for your changes
+1 -1

0 comment

1 changed file

pr created time in a month

create barnchJojoshua/DefinitelyTyped

branch : tabulator-tables-4.6-updates

created branch time in a month

issue commentolifolkerd/tabulator

Version 4.6 Released

I remember some other discussion about this. Try reviewing comments here for possible solution. https://github.com/DefinitelyTyped/DefinitelyTyped/pull/34756

olifolkerd

comment created time in 2 months

issue commentolifolkerd/tabulator

Version 4.6 Released

@mbulfair that doesn't look like a typescript issue or error. There is probably something else going on.

olifolkerd

comment created time in 2 months

issue commentolifolkerd/tabulator

Version 4.6 Released

Sure thing. I thought you already had it under language support though.

olifolkerd

comment created time in 2 months

issue commentolifolkerd/tabulator

Version 4.6 Released

You can reference this as an example.

https://github.com/Jojoshua/TypedTabulator

olifolkerd

comment created time in 2 months

issue commentolifolkerd/tabulator

tabEndNewRow lost data & doesn't focus using Firefox in classic render mode

Hi @olifolkerd thanks for looking into this again. I appreciate you wanting Tabulator to work consistently across all supported browsers and well tested against production sites.

I believe that fixing an underlying issue could improve the virtual dom rendering which affects many more scenarios. Upon some further testing of my own it appears that the virtualDom rendering is part of the issue. When I turn off virtualDom, the tabbing to new row is lightning fast and always accurate in all supported browsers.

Please try this minor adjustment https://jsfiddle.net/jojoshua/qkzbL9hj/1/

Jojoshua

comment created time in 2 months

push eventJojoshua/DefinitelyTyped

Jojoshua

commit sha 3cd42024f04b6fcd928521e13c01f66994e34856

don't include patch version

view details

push time in 2 months

push eventJojoshua/DefinitelyTyped

Jojoshua

commit sha 48912f00ebb8e3405a156b6a039f00c899bdb22c

update virtualDomBuffer

view details

push time in 2 months

PR opened DefinitelyTyped/DefinitelyTyped

Fixes from documentation tabulator-tables 4.6.1

Please fill in this template.

  • [x] Use a meaningful title for the pull request. Include the name of the package modified.
  • [x] Test the change in your own code. (Compile and run.)
  • [x] Add or edit tests to reflect the change. (Run with npm test.)
  • [x] Follow the advice from the readme.
  • [x] Avoid common mistakes.
  • [x] Run npm run lint package-name (or tsc if no tslint.json is present).

If changing an existing definition:

+11 -11

0 comment

2 changed files

pr created time in 2 months

create barnchJojoshua/DefinitelyTyped

branch : tabulator-tables-4.6.1

created branch time in 2 months

issue commentolifolkerd/tabulator

tabEndNewRow lost data & doesn't focus using Firefox in classic render mode

Ok I still think it is related to the original issue somehow. Typically if you want to tab out of the last cell it is a fast operation so then you will start immediately typing to the next cell. Is there a settimeout somewhere?

Jojoshua

comment created time in 2 months

issue commentolifolkerd/tabulator

tabEndNewRow lost data & doesn't focus using Firefox in classic render mode

Yes it does seem related to timing a bit. I am also noticing that if I type in data into the fields and even slowly tab, it does not focus to the next row when I get to the 3rd row. Are you able to reproduce that?

I type a (tab) b(tab) c(tab) d(tab) then the next cell is not focused.

Jojoshua

comment created time in 2 months

issue commentolifolkerd/tabulator

tabEndNewRow lost data & doesn't focus using Firefox in classic render mode

Hi Oli,

I am still experiencing this issue even using 4.6.2. https://jsfiddle.net/jojoshua/vjnkyma0/4/ shows the same example using the new version.

With Firefox, click inside the first cell, then keep tabbing through. You will eventually get the cursor to loose focus and then switch to the 2nd cell of 2nd column. It repeats this cycle for each row added.

Josh

Jojoshua

comment created time in 2 months

Pull request review commentDefinitelyTyped/DefinitelyTyped

Update to tabulator-tables 4.6

-// Type definitions for tabulator-tables 4.5+// Type definitions for tabulator-tables 4.6 // Project: http://tabulator.info // Definitions by: Josh Harris <https://github.com/jojoshua> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped-// TypeScript Version: 2.3+// TypeScript Version: 3.7

Another minor change but should be good to go now.

Jojoshua

comment created time in 2 months

push eventJojoshua/DefinitelyTyped

Jojoshua

commit sha cd1700ef0bb85d35016f7e62cbd6042058756f04

update array type

view details

push time in 2 months

Pull request review commentDefinitelyTyped/DefinitelyTyped

Update to tabulator-tables 4.6

-// Type definitions for tabulator-tables 4.5+// Type definitions for tabulator-tables 4.6 // Project: http://tabulator.info // Definitions by: Josh Harris <https://github.com/jojoshua> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped-// TypeScript Version: 2.3+// TypeScript Version: 3.7

I agree. I was thinking about this after I changed it. It doesn't really make sense that the minimum TS version check goes against the tests rather than the actual .d.ts file where it will be used. I've updated it.

Jojoshua

comment created time in 2 months

push eventJojoshua/DefinitelyTyped

Jojoshua

commit sha ccd5984fc34e1081a0da195e604e3cf4e1fdfe0f

change minimum typescript version

view details

push time in 2 months

push eventJojoshua/DefinitelyTyped

Jojoshua

commit sha ad45641482fdecb1f60cb33e01c5b8dd215f8b9e

update typescript version

view details

push time in 2 months

PR opened DefinitelyTyped/DefinitelyTyped

Update to tabulator-tables 4.6

Please fill in this template.

  • [x] Use a meaningful title for the pull request. Include the name of the package modified.
  • [x] Test the change in your own code. (Compile and run.)
  • [x] Add or edit tests to reflect the change. (Run with npm test.)
  • [x] Follow the advice from the readme.
  • [x] Avoid common mistakes.
  • [x] Run npm run lint package-name (or tsc if no tslint.json is present).

If changing an existing definition:

  • [x] Provide a URL to documentation or source code which provides context for the suggested changes: <http://tabulator.info/docs/4.6/release>
  • [x] If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.
+222 -34

0 comment

2 changed files

pr created time in 2 months

push eventJojoshua/DefinitelyTyped

Jojoshua

commit sha 23a823eb87207e3f54cfcc224e478033758e7c10

update version number

view details

push time in 2 months

create barnchJojoshua/DefinitelyTyped

branch : tabulator-tables-4.6

created branch time in 2 months

issue commentolifolkerd/tabulator

Version 4.6 Released

http://tabulator.info/docs/4.6/release#filter

"You get the current header filter value of a column by calling the getHeaderFilterValue function, This function takes any of the standard column component look up options as its first parameter, with the value for the header filter as the second option"

var filterValue = table.getHeaderFilterValue("name");

The example doesn't show a 2nd parameter but also I am confused why there would be a 2nd parameter.

olifolkerd

comment created time in 2 months

issue commentolifolkerd/tabulator

Version 4.6 Released

http://tabulator.info/docs/4.6/upgrade#clipboard

"The copy function now takes a Row Range Lookup value instead of the previous values of "table", "active" and "selected"."

The code snippet looks like there is a "copy" function off the table object. table.copy("table")

I have no record of a "copy" function off the table object though. Was this snippet supposed to be table.copyToClipboard('table') and table.copyToClipboard("all")

?

olifolkerd

comment created time in 2 months

issue commentolifolkerd/tabulator

Version 4.6 Released

http://tabulator.info/docs/4.6/release#clipboard -> Cell Formatters

Is this snippet function clipboardFormatter(cell, formatterParams, onRendered){ return cell.getValue() ? "YES" : "NO"; }

Supposed to be this?

function printFormatter(cell, formatterClipboardParams , onRendered){ return cell.getValue() ? "YES" : "NO"; }

olifolkerd

comment created time in 2 months

issue commentolifolkerd/tabulator

Version 4.6 Released

"If you want to set the horizontal alignment on a column by column basis, you can use the renamed hozAlign property"

What was the name of the property that was renamed to hozAlign?

olifolkerd

comment created time in 2 months

issue commentolifolkerd/tabulator

Version 4.6 Released

http://tabulator.info/docs/4.6/release#menu

Question regarding Column Cell Context Menus. The code snippet has the property named as contextMenu. Is that a typo? I would have thought it would be something like cellContextMenu.

olifolkerd

comment created time in 2 months

issue commentolifolkerd/tabulator

Version 4.6 Released

Great release. I will work on updating the typescript definitions.

olifolkerd

comment created time in 2 months

pull request commentolifolkerd/tabulator

Update build to gulp 4

Maybe gulp is meant to be installed globally?

Jojoshua

comment created time in 2 months

pull request commentolifolkerd/tabulator

Update build to gulp 4

Want me to include that or you got it?

Jojoshua

comment created time in 2 months

pull request commentolifolkerd/tabulator

Update build to gulp 4

Ah yes agreed so would we need to add the cli to package.json?

Jojoshua

comment created time in 2 months

pull request commentolifolkerd/tabulator

Update build to gulp 4

Understood, your call. The general idea for this was to keep the build tools current. It may be different environment for each contributor anyway. In my case by not having v4 caused other problems trying to get started.

Jojoshua

comment created time in 2 months

pull request commentolifolkerd/tabulator

Update build to gulp 4

Hmm sounds like similar problem as here https://github.com/gulpjs/gulp-cli/issues/192

Try instructions here to see if it cleans up the old version https://gulpjs.com/docs/en/getting-started/quick-start

Jojoshua

comment created time in 2 months

issue openedmicrosoft/TypeScript

3.9.0-beta - Problem with string literal union

TypeScript Version: Nightly

Expected behavior: Accept string literal as part of interface/object

Actual behavior: Compiler error on last line stating the type is incompatible. If formatter: "html" is removed from commonValueColumnProps the error goes away.

Code

interface ColumnLayout {
  title: string;
  field: string;
}

type Formatter = "plaintext" | "textarea" | "html";

interface ColumnDefinition extends ColumnLayout {
  minWidth?: number;
  formatter?: Formatter;
}

const columns: ColumnDefinition[] = [];

const commonValueColumnProps = {
  minWidth: 1,
  formatter: "html"
};

const colDef = Object.assign(
  {
    title: "title",
    field: "field"
  },
  commonValueColumnProps
);

columns.push(colDef);

<details><summary><b>Output</b></summary>

"use strict";
const columns = [];
const commonValueColumnProps = {
    minWidth: 1,
    formatter: "html"
};
const colDef = Object.assign({
    title: "title",
    field: "field"
}, commonValueColumnProps);
columns.push(colDef);

</details>

<details><summary><b>Compiler Options</b></summary>

{
  "compilerOptions": {
    "noImplicitAny": true,
    "strictNullChecks": true,
    "strictFunctionTypes": true,
    "strictPropertyInitialization": true,
    "strictBindCallApply": true,
    "noImplicitThis": true,
    "noImplicitReturns": true,
    "useDefineForClassFields": false,
    "alwaysStrict": true,
    "allowUnreachableCode": false,
    "allowUnusedLabels": false,
    "downlevelIteration": false,
    "noEmitHelpers": false,
    "noLib": false,
    "noStrictGenericChecks": false,
    "noUnusedLocals": false,
    "noUnusedParameters": false,
    "esModuleInterop": true,
    "preserveConstEnums": false,
    "removeComments": false,
    "skipLibCheck": false,
    "checkJs": false,
    "allowJs": false,
    "declaration": true,
    "experimentalDecorators": false,
    "emitDecoratorMetadata": false,
    "target": "ES2017",
    "module": "ESNext"
  }
}

</details>

Playground Link: Provided

created time in 2 months

more